From bc25012753704943808bb8f71d75f27f68c13da9 Mon Sep 17 00:00:00 2001 From: Benjamin Paassen Date: Thu, 9 Apr 2015 14:56:28 +0200 Subject: fixed a bug in the DocumentHandler which lead to problems in case of empty explicit fields. --- src/core/parser/stack/DocumentHandler.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/core/parser/stack/DocumentHandler.cpp') diff --git a/src/core/parser/stack/DocumentHandler.cpp b/src/core/parser/stack/DocumentHandler.cpp index ce6267f..04f79fb 100644 --- a/src/core/parser/stack/DocumentHandler.cpp +++ b/src/core/parser/stack/DocumentHandler.cpp @@ -634,11 +634,12 @@ void DocumentChildHandler::end() case HandlerType::COMMAND: case HandlerType::ANNOTATION_START: case HandlerType::TOKEN: - // In case of explicit fields we do not want to pop something from - // the stack. - if (!isExplicitField) { + if(!isExplicitField){ // pop the "main" element. scope().pop(logger()); + } else{ + // in case of explicit fields, roll back. + rollbackPath(); } break; case HandlerType::ANNOTATION_END: @@ -692,8 +693,8 @@ void DocumentChildHandler::fieldEnd() { if (!isExplicitField) { popTokens(); + rollbackPath(); } - rollbackPath(); } bool DocumentChildHandler::convertData(Handle field, -- cgit v1.2.3