1 parent 21eef55 commit 8fc77a4Copy full SHA for 8fc77a4
1 file changed
tests/singleheadertest.cpp
@@ -8,7 +8,9 @@ int main() {
8
if( ! pj.isValid() ) {
9
return EXIT_FAILURE;
10
}
11
- pj.allocateCapacity(p.size());
+ if( ! pj.allocateCapacity(p.size()) ) {
12
+ return EXIT_FAILURE;
13
+ }
14
const int res = json_parse(p, pj);
15
if (res) {
16
std::cerr << simdjson::errorMsg(res) << std::endl;
0 commit comments