From d449888405847f5c95a2eb4c823da89be2feac7d Mon Sep 17 00:00:00 2001 From: Arisotura Date: Sat, 15 Jun 2024 19:10:28 +0200 Subject: [PATCH] fix up the regexes in Config.cpp --- src/frontend/qt_sdl/Config.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/frontend/qt_sdl/Config.cpp b/src/frontend/qt_sdl/Config.cpp index 79687ddf..f88bc6fa 100644 --- a/src/frontend/qt_sdl/Config.cpp +++ b/src/frontend/qt_sdl/Config.cpp @@ -484,7 +484,7 @@ int Table::GetInt(const std::string& path) int ret = (int)tval.as_integer(); - std::regex rng_re("\\d+"); + std::regex rng_re("(\\d+)"); std::string rngkey = std::regex_replace(PathPrefix+path, rng_re, "*"); if (IntRanges.count(rngkey) != 0) { @@ -524,7 +524,7 @@ std::string Table::GetString(const std::string& path) void Table::SetInt(const std::string& path, int val) { - std::regex rng_re("\\d+"); + std::regex rng_re("(\\d+)"); std::string rngkey = std::regex_replace(PathPrefix+path, rng_re, "*"); if (IntRanges.count(rngkey) != 0) { @@ -571,7 +571,7 @@ toml::value& Table::ResolvePath(const std::string& path) template T Table::FindDefault(const std::string& path, T def, DefaultList list) { - std::regex def_re("\\d+"); + std::regex def_re("(\\d+)"); std::string defkey = std::regex_replace(PathPrefix+path, def_re, "*"); T ret = def;