diff options
author | dan <Dan Kennedy> | 2024-01-22 19:00:50 +0000 |
---|---|---|
committer | dan <Dan Kennedy> | 2024-01-22 19:00:50 +0000 |
commit | fbb72fae8ff79bdc1308f70c64a8093c9d605ce8 (patch) | |
tree | a09388bce5db1344700a24455edd40bd9e1d89c9 /src | |
parent | 87ad06ed997a505b60d2ca9c9751c0d0e83cfbd4 (diff) | |
download | sqlite-fbb72fae8ff79bdc1308f70c64a8093c9d605ce8.tar.gz sqlite-fbb72fae8ff79bdc1308f70c64a8093c9d605ce8.zip |
Add extra tests for the code on this branch.
FossilOrigin-Name: b15bbb201a7727806b9fd6c02f2579b01e0e38155a8f9e24c5d6f487fe3e8b6c
Diffstat (limited to 'src')
-rw-r--r-- | src/tokenize.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/tokenize.c b/src/tokenize.c index 37254da70..7a30512ec 100644 --- a/src/tokenize.c +++ b/src/tokenize.c @@ -477,8 +477,14 @@ int sqlite3GetToken(const unsigned char *z, int *tokenType){ if( *tokenType==TK_INTEGER ) *tokenType = TK_FLOAT; for(i+=2; 1; i++){ if( sqlite3Isdigit(z[i])==0 ){ - if( z[i]==SQLITE_DIGIT_SEPARATOR ){ *tokenType = TK_QNUMBER; } - else{ break; } + if( z[i]==SQLITE_DIGIT_SEPARATOR + && sqlite3Isdigit(z[i-1]) + && sqlite3Isdigit(z[i+1]) + ){ + *tokenType = TK_QNUMBER; + }else{ + break; + } } } } |