Skip to content

Commit d79533c

Browse files
authored
Merge pull request Tencent#1199 from kachanovskiy/master
Fixes Tencent#1198
2 parents 3b638e6 + 2e5dcce commit d79533c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

include/rapidjson/schema.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1860,7 +1860,12 @@ class GenericSchemaValidator :
18601860

18611861
//! Gets the JSON pointer pointed to the invalid value.
18621862
PointerType GetInvalidDocumentPointer() const {
1863-
return documentStack_.Empty() ? PointerType() : PointerType(documentStack_.template Bottom<Ch>(), documentStack_.GetSize() / sizeof(Ch));
1863+
if (documentStack_.Empty()) {
1864+
return PointerType();
1865+
}
1866+
else {
1867+
return PointerType(documentStack_.template Bottom<Ch>(), documentStack_.GetSize() / sizeof(Ch));
1868+
}
18641869
}
18651870

18661871
void NotMultipleOf(int64_t actual, const SValue& expected) {

0 commit comments

Comments
 (0)