mirror of
https://gitlab.com/GaryOderNichts/re3-wiiu.git
synced 2024-11-29 20:44:16 +01:00
Fix ini reader
This commit is contained in:
parent
67e57d1368
commit
feeab0b74a
@ -86,7 +86,8 @@ CustomFrontendOptionsPopulate(void)
|
|||||||
linb::ini cfg;
|
linb::ini cfg;
|
||||||
int CheckAndReadIniInt(const char *cat, const char *key, int original)
|
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')
|
if (value && value[0] != '\0')
|
||||||
return atoi(value);
|
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)
|
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')
|
if (value && value[0] != '\0')
|
||||||
return atof(value);
|
return atof(value);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user