From eb9075c65f9a5fc2469869472245cf5aa3d6df26 Mon Sep 17 00:00:00 2001 From: Johan Crone Date: Wed, 14 Jan 2026 16:06:51 +0100 Subject: [PATCH] Fix #14317 Syntax error using macro inside ifdef block --- externals/simplecpp/simplecpp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/externals/simplecpp/simplecpp.cpp b/externals/simplecpp/simplecpp.cpp index 581c9b10990..c3ca98ea8ea 100644 --- a/externals/simplecpp/simplecpp.cpp +++ b/externals/simplecpp/simplecpp.cpp @@ -3339,7 +3339,7 @@ void simplecpp::preprocess(simplecpp::TokenList &output, const simplecpp::TokenL if (dui.undefined.find(macroname) != dui.undefined.end()) continue; const std::string lhs(macrostr.substr(0,eq)); - const std::string rhs(eq==std::string::npos ? std::string("1") : macrostr.substr(eq+1)); + const std::string rhs(eq == std::string::npos ? lhs : macrostr.substr(eq + 1)); const Macro macro(lhs, rhs, dummy); macros.insert(std::pair(macro.name(), macro)); }