Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/core/StarJsonParser.hpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/core/StarJsonParser.hpp b/source/core/StarJsonParser.hpp
index c7a9cc6..d814edb 100644
--- a/source/core/StarJsonParser.hpp
+++ b/source/core/StarJsonParser.hpp
@@ -521,12 +521,13 @@ public:
}
void endObject() {
- if (currentState() == ObjectElement) {
+ bool isNotEmpty = currentState() == ObjectElement;
+ popState(Object);
+ if (isNotEmpty) {
if (m_pretty)
write('\n');
indent();
}
- popState(Object);
write('}');
}