diff options
author | drh <drh@noemail.net> | 2010-03-04 17:11:31 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2010-03-04 17:11:31 +0000 |
commit | 69ef70362a5a6bde5a188c3ad59557db044fd89a (patch) | |
tree | 3123022b2341961cbe72b8ad6293e9e4709b01a7 /src | |
parent | c05a9a8a575aef38931caee1b763a09e926bc54a (diff) | |
download | sqlite-69ef70362a5a6bde5a188c3ad59557db044fd89a.tar.gz sqlite-69ef70362a5a6bde5a188c3ad59557db044fd89a.zip |
Fix an uninitialized variable in printf when compiling with
SQLITE_OMIT_FLOATING_POINT.
FossilOrigin-Name: 14ad62b9a54dba5c5a2d4a994bcd4be6ab6e711f
Diffstat (limited to 'src')
-rw-r--r-- | src/printf.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/printf.c b/src/printf.c index ab2cfcc64..333cfbdc1 100644 --- a/src/printf.c +++ b/src/printf.c @@ -460,7 +460,9 @@ void sqlite3VXPrintf( case etEXP: case etGENERIC: realvalue = va_arg(ap,double); -#ifndef SQLITE_OMIT_FLOATING_POINT +#ifdef SQLITE_OMIT_FLOATING_POINT + length = 0; +#else if( precision<0 ) precision = 6; /* Set default precision */ if( precision>etBUFSIZE/2-10 ) precision = etBUFSIZE/2-10; if( realvalue<0.0 ){ @@ -606,7 +608,7 @@ void sqlite3VXPrintf( while( nPad-- ) bufpt[i++] = '0'; length = width; } -#endif +#endif /* !defined(SQLITE_OMIT_FLOATING_POINT) */ break; case etSIZE: *(va_arg(ap,int*)) = pAccum->nChar; |