aboutsummaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2013-11-26 18:00:29 +0000
committerdrh <drh@noemail.net>2013-11-26 18:00:29 +0000
commit1b2ee4fe1afb4edd3d04e62daeb133df41809e38 (patch)
tree3f90016343959f3349a8086cb43c38cb4de975a3 /src/util.c
parent212c6be1417860712de4b93b31342b72c9fa89dd (diff)
parent55fcab39be8186caac6c7d1262a7c943564623bb (diff)
downloadsqlite-1b2ee4fe1afb4edd3d04e62daeb133df41809e38.tar.gz
sqlite-1b2ee4fe1afb4edd3d04e62daeb133df41809e38.zip
Merge in performance enhancements from trunk.
FossilOrigin-Name: fc9ae839569eb28eb734c52d95676c59b2e27494
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/util.c b/src/util.c
index 50ffd9865..5aa8af68d 100644
--- a/src/util.c
+++ b/src/util.c
@@ -512,7 +512,7 @@ int sqlite3Atoi64(const char *zNum, i64 *pNum, int length, u8 enc){
u = u*10 + c - '0';
}
if( u>LARGEST_INT64 ){
- *pNum = SMALLEST_INT64;
+ *pNum = neg ? SMALLEST_INT64 : LARGEST_INT64;
}else if( neg ){
*pNum = -(i64)u;
}else{
@@ -543,7 +543,6 @@ int sqlite3Atoi64(const char *zNum, i64 *pNum, int length, u8 enc){
/* zNum is exactly 9223372036854775808. Fits if negative. The
** special case 2 overflow if positive */
assert( u-1==LARGEST_INT64 );
- assert( (*pNum)==SMALLEST_INT64 );
return neg ? 0 : 2;
}
}