Don't insert terminating zero

This commit is contained in:
Sergey Kosarevsky 2016-03-02 02:06:33 +01:00
parent 5642a81f24
commit bea3790a74

View File

@ -1293,7 +1293,7 @@ private:
typename InputStream::Ch* head = is.PutBegin(); typename InputStream::Ch* head = is.PutBegin();
const size_t length = s.Tell() - startOffset; const size_t length = s.Tell() - startOffset;
RAPIDJSON_ASSERT(length <= 0xFFFFFFFF); RAPIDJSON_ASSERT(length <= 0xFFFFFFFF);
*(head + length) = '\0'; // *(head + length) = '\0';
const typename TargetEncoding::Ch* const str = reinterpret_cast<typename TargetEncoding::Ch*>(head); const typename TargetEncoding::Ch* const str = reinterpret_cast<typename TargetEncoding::Ch*>(head);
cont = handler.RawNumber(str, SizeType(length), false); cont = handler.RawNumber(str, SizeType(length), false);
} }