Skip to content

Commit 06e236b

Browse files
authored
Merge branch 'master' into docs/readme-conan
2 parents 8992c49 + 30e7528 commit 06e236b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/lib_json/json_reader.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,12 @@ bool Reader::readValue() {
144144
// after calling readValue(). parse() executes one nodes_.push(), so > instead
145145
// of >=.
146146
if (nodes_.size() > stackLimit_g)
147+
#if JSON_USE_EXCEPTION
147148
throwRuntimeError("Exceeded stackLimit in readValue().");
149+
#else
150+
// throwRuntimeError aborts. Don't abort here.
151+
return false;
152+
#endif
148153

149154
Token token;
150155
readTokenSkippingComments(token);

0 commit comments

Comments
 (0)