Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Unified Diff: third_party/sqlite/src/ext/misc/ieee754.c

Issue 1610963002: Import SQLite 3.10.2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/sqlite/src/ext/misc/fuzzer.c ('k') | third_party/sqlite/src/ext/misc/json1.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/ext/misc/ieee754.c
diff --git a/third_party/sqlite/src/ext/misc/ieee754.c b/third_party/sqlite/src/ext/misc/ieee754.c
index f1438938857723b53d32b2ce14ce31c62310efd9..20c5e6143347ca712183145a3ea7f23a4288fc72 100644
--- a/third_party/sqlite/src/ext/misc/ieee754.c
+++ b/third_party/sqlite/src/ext/misc/ieee754.c
@@ -94,16 +94,16 @@ static void ieee754func(
m >>= 1;
e++;
}
- while( ((m>>32)&0xfff00000)==0 ){
+ while( m!=0 && ((m>>32)&0xfff00000)==0 ){
m <<= 1;
e--;
}
e += 1075;
if( e<0 ) e = m = 0;
- if( e>0x7ff ) m = 0;
+ if( e>0x7ff ) e = 0x7ff;
a = m & ((((sqlite3_int64)1)<<52)-1);
a |= e<<52;
- if( isNeg ) a |= ((sqlite3_int64)1)<<63;
+ if( isNeg ) a |= ((sqlite3_uint64)1)<<63;
memcpy(&r, &a, sizeof(r));
sqlite3_result_double(context, r);
}
« no previous file with comments | « third_party/sqlite/src/ext/misc/fuzzer.c ('k') | third_party/sqlite/src/ext/misc/json1.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698