diff options
author | drh <drh@noemail.net> | 2006-03-03 19:12:29 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2006-03-03 19:12:29 +0000 |
commit | 57bacb2282f9fc3f1a76fd148554b9f3428359d2 (patch) | |
tree | 4053724517c1f7fe6c73837a79b3095abf941d4f /src | |
parent | 41714d6f837ad0313b0aaa3f2813dcc5410bb0db (diff) | |
download | sqlite-57bacb2282f9fc3f1a76fd148554b9f3428359d2.tar.gz sqlite-57bacb2282f9fc3f1a76fd148554b9f3428359d2.zip |
Ignore leading spaces on text to numeric conversions. Ticket #1662.
Fixes to test cases broken by the recent changes to round(). (CVS 3118)
FossilOrigin-Name: cdca3383c54b33aeafbbdbbb4ae7c90796cf66e5
Diffstat (limited to 'src')
-rw-r--r-- | src/util.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/util.c b/src/util.c index b2b70b695..d283c49f8 100644 --- a/src/util.c +++ b/src/util.c @@ -14,7 +14,7 @@ ** This file contains functions for allocating memory, comparing ** strings, and stuff like that. ** -** $Id: util.c,v 1.186 2006/02/24 02:53:50 drh Exp $ +** $Id: util.c,v 1.187 2006/03/03 19:12:30 drh Exp $ */ #include "sqliteInt.h" #include "os.h" @@ -971,6 +971,7 @@ int sqlite3AtoF(const char *z, double *pResult){ int sign = 1; const char *zBegin = z; LONGDOUBLE_TYPE v1 = 0.0; + while( isspace(*z) ) z++; if( *z=='-' ){ sign = -1; z++; @@ -1038,6 +1039,7 @@ int sqlite3atoi64(const char *zNum, i64 *pNum){ i64 v = 0; int neg; int i, c; + while( isspace(*zNum) ) zNum++; if( *zNum=='-' ){ neg = 1; zNum++; |