1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

Fix an uninitialized variable in printf when compiling with

SQLITE_OMIT_FLOATING_POINT.

FossilOrigin-Name: 14ad62b9a54dba5c5a2d4a994bcd4be6ab6e711f
This commit is contained in:
drh
2010-03-04 17:11:31 +00:00
parent c05a9a8a57
commit 69ef70362a
3 changed files with 14 additions and 12 deletions

View File

@@ -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;