From d341a48938eb2759f843c4642841fa1994d5d496 Mon Sep 17 00:00:00 2001 From: MihailRis Date: Thu, 8 Jan 2026 22:17:34 +0300 Subject: [PATCH] fix nested vcm elements --- src/coders/xml.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/coders/xml.cpp b/src/coders/xml.cpp index 0763fa430..12a9f981b 100644 --- a/src/coders/xml.cpp +++ b/src/coders/xml.cpp @@ -383,7 +383,11 @@ public: void parseSubElements(Node& node) { skipWhitespace(); while (hasNext()) { - if (peek() != '@') { + char c = peek(); + if (c == '}') { + break; + } + if (c != '@') { throw error("unexpected character in element"); } nextChar(); @@ -402,14 +406,12 @@ public: if (!hasNext()) { break; } - char c = peek(); + c = peek(); if (c == '{') { nextChar(); parseSubElements(*subnode); expect('}'); skipWhitespace(); - } else if (c == '}') { - break; } } }