summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-11-11 19:57:44 +0100
committerSergeanur <s.anureev@yandex.ua>2020-11-11 19:57:44 +0100
commitfeeab0b74afa63376e51b1869f6e4a17fec9a420 (patch)
treedba4d4080613b52536ef8c7c1928f64268ce836b /src/core
parentFix RestoreDef crash (diff)
downloadre3-feeab0b74afa63376e51b1869f6e4a17fec9a420.tar
re3-feeab0b74afa63376e51b1869f6e4a17fec9a420.tar.gz
re3-feeab0b74afa63376e51b1869f6e4a17fec9a420.tar.bz2
re3-feeab0b74afa63376e51b1869f6e4a17fec9a420.tar.lz
re3-feeab0b74afa63376e51b1869f6e4a17fec9a420.tar.xz
re3-feeab0b74afa63376e51b1869f6e4a17fec9a420.tar.zst
re3-feeab0b74afa63376e51b1869f6e4a17fec9a420.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/re3.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/re3.cpp b/src/core/re3.cpp
index 6bf5573e..4783e513 100644
--- a/src/core/re3.cpp
+++ b/src/core/re3.cpp
@@ -86,7 +86,8 @@ CustomFrontendOptionsPopulate(void)
linb::ini cfg;
int CheckAndReadIniInt(const char *cat, const char *key, int original)
{
- const char *value = (cfg.get(cat, key, "").c_str());
+ std::string strval = cfg.get(cat, key, "");
+ const char *value = strval.c_str();
if (value && value[0] != '\0')
return atoi(value);
@@ -95,7 +96,8 @@ int CheckAndReadIniInt(const char *cat, const char *key, int original)
float CheckAndReadIniFloat(const char *cat, const char *key, float original)
{
- const char *value = (cfg.get(cat, key, "").c_str());
+ std::string strval = cfg.get(cat, key, "");
+ const char *value = strval.c_str();
if (value && value[0] != '\0')
return atof(value);