From edb88273e72ad830da61a943483ada464b15536e Mon Sep 17 00:00:00 2001 From: Jan Date: Sat, 30 Dec 2023 16:45:06 +0100 Subject: [PATCH] Fix not correct adding input suffix when expanding nested macro --- src/Parser/Parsing/Impl/DefinesStreamProxy.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Parser/Parsing/Impl/DefinesStreamProxy.cpp b/src/Parser/Parsing/Impl/DefinesStreamProxy.cpp index 949ec6fd..40270152 100644 --- a/src/Parser/Parsing/Impl/DefinesStreamProxy.cpp +++ b/src/Parser/Parsing/Impl/DefinesStreamProxy.cpp @@ -837,8 +837,8 @@ void DefinesStreamProxy::ProcessNestedMacros(ParserLine& line, unsigned& linePos if (usesDefines) { // Make sure we account for all text between the last macro and the end - if (lastDefineEnd < line.m_line.size()) - ss << std::string(line.m_line, lastDefineEnd, line.m_line.size() - lastDefineEnd); + if (lastDefineEnd < input.size()) + ss << std::string(input, lastDefineEnd, input.size() - lastDefineEnd); input = ss.str(); } }