diff options
Diffstat (limited to 'chromium/third_party/sqlite/patched/src/util.c')
-rw-r--r-- | chromium/third_party/sqlite/patched/src/util.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/chromium/third_party/sqlite/patched/src/util.c b/chromium/third_party/sqlite/patched/src/util.c index d70b93bb79b..0d12b8d53a4 100644 --- a/chromium/third_party/sqlite/patched/src/util.c +++ b/chromium/third_party/sqlite/patched/src/util.c @@ -192,6 +192,7 @@ void sqlite3ErrorMsg(Parse *pParse, const char *zFormat, ...){ sqlite3DbFree(db, pParse->zErrMsg); pParse->zErrMsg = zMsg; pParse->rc = SQLITE_ERROR; + pParse->pWith = 0; } } @@ -385,7 +386,7 @@ static LONGDOUBLE_TYPE sqlite3Pow10(int E){ int sqlite3AtoF(const char *z, double *pResult, int length, u8 enc){ #ifndef SQLITE_OMIT_FLOATING_POINT int incr; - const char *zEnd = z + length; + const char *zEnd; /* sign * significand * (10 ^ (esign * exponent)) */ int sign = 1; /* sign of significand */ i64 s = 0; /* significand */ @@ -399,9 +400,11 @@ int sqlite3AtoF(const char *z, double *pResult, int length, u8 enc){ assert( enc==SQLITE_UTF8 || enc==SQLITE_UTF16LE || enc==SQLITE_UTF16BE ); *pResult = 0.0; /* Default return value, in case of an error */ + if( length==0 ) return 0; if( enc==SQLITE_UTF8 ){ incr = 1; + zEnd = z + length; }else{ int i; incr = 2; |