From 610626b9cb7d2170a94f4f4783578e38a681dd44 Mon Sep 17 00:00:00 2001 From: glank Date: Fri, 7 Aug 2026 21:34:25 +0200 Subject: [PATCH] Add newline to macro def string before tokenizing --- simplecpp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simplecpp.cpp b/simplecpp.cpp index 4b24e311..326453a4 100644 --- a/simplecpp.cpp +++ b/simplecpp.cpp @@ -1595,7 +1595,7 @@ namespace simplecpp { * @throws std::runtime_error thrown on bad macro syntax */ Macro(const std::string &name, const std::string &value, std::vector &f) : nameTokDef(nullptr), files(f), tokenListDefine(f), valueDefinedInCode_(false) { - const std::string def(name + ' ' + value); + const std::string def(name + ' ' + value + '\n'); StdCharBufStream stream(reinterpret_cast(def.data()), def.size()); tokenListDefine.readfile(stream); if (!parseDefine(tokenListDefine.cfront()))