Skip to content

Commit eb9075c

Browse files
committed
Fix #14317 Syntax error using macro inside ifdef block
1 parent b0bbcff commit eb9075c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

externals/simplecpp/simplecpp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3339,7 +3339,7 @@ void simplecpp::preprocess(simplecpp::TokenList &output, const simplecpp::TokenL
33393339
if (dui.undefined.find(macroname) != dui.undefined.end())
33403340
continue;
33413341
const std::string lhs(macrostr.substr(0,eq));
3342-
const std::string rhs(eq==std::string::npos ? std::string("1") : macrostr.substr(eq+1));
3342+
const std::string rhs(eq == std::string::npos ? lhs : macrostr.substr(eq + 1));
33433343
const Macro macro(lhs, rhs, dummy);
33443344
macros.insert(std::pair<TokenString,Macro>(macro.name(), macro));
33453345
}

0 commit comments

Comments
 (0)