File tree Expand file tree Collapse file tree 2 files changed +2
-0
lines changed
include/rapidjson/internal Expand file tree Collapse file tree 2 files changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,7 @@ struct DiyFp {
100
100
}
101
101
102
102
DiyFp Normalize () const {
103
+ RAPIDJSON_ASSERT (f != 0 ); // https://stackoverflow.com/a/26809183/291737
103
104
#if defined(_MSC_VER) && defined(_M_AMD64)
104
105
unsigned long index;
105
106
_BitScanReverse64 (&index, f);
Original file line number Diff line number Diff line change @@ -207,6 +207,7 @@ static void TestParseDouble() {
207
207
208
208
TEST_DOUBLE (fullPrecision, " 0.0" , 0.0 );
209
209
TEST_DOUBLE (fullPrecision, " -0.0" , -0.0 ); // For checking issue #289
210
+ TEST_DOUBLE (fullPrecision, " 0e100" , 0.0 ); // For checking issue #1249
210
211
TEST_DOUBLE (fullPrecision, " 1.0" , 1.0 );
211
212
TEST_DOUBLE (fullPrecision, " -1.0" , -1.0 );
212
213
TEST_DOUBLE (fullPrecision, " 1.5" , 1.5 );
You can’t perform that action at this time.
0 commit comments