From d8f8d6851c094d4beb1fb4de6d0b58444043744d Mon Sep 17 00:00:00 2001 From: Charl Wentzel Date: Mon, 4 Nov 2019 13:15:04 +0200 Subject: [PATCH] Important Update: - JSONparseCore: - Bug fix: Always shows "No content after root" error --- JSONparseCore.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/JSONparseCore.cpp b/JSONparseCore.cpp index ef35ed0..b57be5e 100644 --- a/JSONparseCore.cpp +++ b/JSONparseCore.cpp @@ -364,7 +364,10 @@ bool CJSONparse::ReadFromBuffer( const char * BasePath ) // Ensure remainder of file is empty SkipWhiteSpace(); - if (*BufPos != 0) { + if (Error) { + return false; + } + else if (*BufPos != 0) { Error = true; CharNo += BufPos-Mark; sprintf( ErrorText, "No content expected after Root object on line %d:%d", LineNo, CharNo );