From 77f643dc511eaa3a1ce0e9dfa2976282ecc6eede Mon Sep 17 00:00:00 2001 From: Milo Yip Date: Fri, 7 Apr 2017 10:23:30 +0800 Subject: [PATCH] Fix #910 incorrect casting --- include/rapidjson/document.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/rapidjson/document.h b/include/rapidjson/document.h index 6de441f..a2b044c 100644 --- a/include/rapidjson/document.h +++ b/include/rapidjson/document.h @@ -2293,7 +2293,7 @@ public: template GenericDocument& Parse(const typename SourceEncoding::Ch* str, size_t length) { RAPIDJSON_ASSERT(!(parseFlags & kParseInsituFlag)); - MemoryStream ms(static_cast(str), length * sizeof(typename SourceEncoding::Ch)); + MemoryStream ms(reinterpret_cast(str), length * sizeof(typename SourceEncoding::Ch)); EncodedInputStream is(ms); ParseStream(is); return *this;