From 5f5d6c200dcb957f55fcaedb2e6643eb1a899e65 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Date: Thu, 16 Sep 2010 12:30:44 +0200 Subject: [PATCH] reinitialize block stack for new files this has only an effect if parsing the previous file failed in a place with a non-empty stack. --- src/shared/proparser/profileparser.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/shared/proparser/profileparser.cpp b/src/shared/proparser/profileparser.cpp index 6c8d0c9fa89..d2b1123e6d8 100644 --- a/src/shared/proparser/profileparser.cpp +++ b/src/shared/proparser/profileparser.cpp @@ -276,7 +276,8 @@ bool ProFileParser::read(ProFile *pro, const QString &in) ushort *buf = (ushort *)xprBuff.constData(); // Parser state - m_blockstack.resize(m_blockstack.size() + 1); + m_blockstack.clear(); + m_blockstack.resize(1); QStack<ParseCtx> xprStack; xprStack.reserve(10); -- GitLab