From b8512cd4861ddee33746117cf702d5b635f95e55 Mon Sep 17 00:00:00 2001 From: jacekpoz Date: Fri, 26 Apr 2024 11:19:29 +0200 Subject: [PATCH] set the line length in list macros properly --- src/osuparser.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/osuparser.cpp b/src/osuparser.cpp index 235eb44..bb5cd52 100644 --- a/src/osuparser.cpp +++ b/src/osuparser.cpp @@ -251,6 +251,7 @@ inline std::string checkAndRemove(const std::string &str, const std::string &pre type val;\ while (ss >> val) {\ std::getline(configFile, line);\ + line_len = line.size();\ value.push_back(val);\ }\ configFile.seekg(configFile.tellg() - line_len);\ @@ -263,6 +264,7 @@ inline std::string checkAndRemove(const std::string &str, const std::string &pre type type_val;\ for (std::string val; std::getline(ss, val, sep);) {\ std::stringstream(val) >> type_val;\ + line_len = line.size();\ value.push_back(type_val);\ }\ configFile.seekg(configFile.tellg() - line_len);\ @@ -275,6 +277,7 @@ inline std::string checkAndRemove(const std::string &str, const std::string &pre type type_val;\ for (std::string val; std::getline(ss, val, sep);) {\ std::stringstream(val) >> type_val;\ + line_len = line.size();\ value.push_back(type_val);\ }\ configFile.seekg(configFile.tellg() - line_len);\