Skip to content

Commit 802ece6

Browse files
authored
Merge pull request Tencent#1147 from DrumMeister/master
Fix uninitilized member Reader::state_
2 parents 87d4e07 + 9bfa0bb commit 802ece6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

include/rapidjson/reader.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,8 @@ class GenericReader {
544544
/*! \param stackAllocator Optional allocator for allocating stack memory. (Only use for non-destructive parsing)
545545
\param stackCapacity stack capacity in bytes for storing a single decoded string. (Only use for non-destructive parsing)
546546
*/
547-
GenericReader(StackAllocator* stackAllocator = 0, size_t stackCapacity = kDefaultStackCapacity) : stack_(stackAllocator, stackCapacity), parseResult_() {}
547+
GenericReader(StackAllocator* stackAllocator = 0, size_t stackCapacity = kDefaultStackCapacity) :
548+
stack_(stackAllocator, stackCapacity), parseResult_(), state_(IterativeParsingStartState) {}
548549

549550
//! Parse JSON text.
550551
/*! \tparam parseFlags Combination of \ref ParseFlag.

0 commit comments

Comments
 (0)