We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 91a803d commit 95224afCopy full SHA for 95224af
include/rapidjson/reader.h
@@ -948,11 +948,13 @@ class GenericReader {
948
#else
949
length = static_cast<SizeType>(__builtin_ffs(r) - 1);
950
#endif
951
- char* q = reinterpret_cast<char*>(os.Push(length));
952
- for (size_t i = 0; i < length; i++)
953
- q[i] = p[i];
+ if (length != 0) {
+ char* q = reinterpret_cast<char*>(os.Push(length));
+ for (size_t i = 0; i < length; i++)
954
+ q[i] = p[i];
955
- p += length;
956
+ p += length;
957
+ }
958
break;
959
}
960
_mm_storeu_si128(reinterpret_cast<__m128i *>(os.Push(16)), s);
0 commit comments