From 9a75404847a0db308821667c4dc4cfde24379328 Mon Sep 17 00:00:00 2001 From: jacekpoz Date: Thu, 25 Apr 2024 22:32:16 +0200 Subject: [PATCH] fix setting the default value basically before this commit, the default value was set *before* the prefix check which means it was set on each line instead of only when the current var is being parsed (as it should) --- src/osuparser.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/osuparser.cpp b/src/osuparser.cpp index fa5684d..cd82a89 100644 --- a/src/osuparser.cpp +++ b/src/osuparser.cpp @@ -90,8 +90,9 @@ inline void toLower(std::string &str) { CHECK_VAR(section, name, __VA_ARGS__) #define VAR_GENERIC_D(section, name, default, ...) \ - ret section.name = default;\ - VAR_GENERIC(section, name, __VA_ARGS__) + VAR_GENERIC(section, name,\ + ret section.name = default;\ + __VA_ARGS__) #define VAR_UINT(section, name) \ VAR_GENERIC(section, name,\