From 2e5dcceda085854a034520bc485365e8c5f9acc2 Mon Sep 17 00:00:00 2001 From: sergey kachanovskiy Date: Mon, 12 Mar 2018 16:11:09 +0100 Subject: [PATCH] Fixes #1198 --- include/rapidjson/schema.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/rapidjson/schema.h b/include/rapidjson/schema.h index 1a8fb26..aefdd95 100644 --- a/include/rapidjson/schema.h +++ b/include/rapidjson/schema.h @@ -1860,7 +1860,12 @@ public: //! Gets the JSON pointer pointed to the invalid value. PointerType GetInvalidDocumentPointer() const { - return documentStack_.Empty() ? PointerType() : PointerType(documentStack_.template Bottom(), documentStack_.GetSize() / sizeof(Ch)); + if (documentStack_.Empty()) { + return PointerType(); + } + else { + return PointerType(documentStack_.template Bottom(), documentStack_.GetSize() / sizeof(Ch)); + } } void NotMultipleOf(int64_t actual, const SValue& expected) {