summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorworktycho <work.tycho@gmail.com>2014-06-07 01:10:58 +0200
committerworktycho <work.tycho@gmail.com>2014-06-07 01:10:58 +0200
commit3275bbf01b79eefb77861cca1fa4fd79c6ae1403 (patch)
tree92c1753835744af86579ac434cf9b44bbf077154
parentFixed Time of day (diff)
downloadcuberite-3275bbf01b79eefb77861cca1fa4fd79c6ae1403.tar
cuberite-3275bbf01b79eefb77861cca1fa4fd79c6ae1403.tar.gz
cuberite-3275bbf01b79eefb77861cca1fa4fd79c6ae1403.tar.bz2
cuberite-3275bbf01b79eefb77861cca1fa4fd79c6ae1403.tar.lz
cuberite-3275bbf01b79eefb77861cca1fa4fd79c6ae1403.tar.xz
cuberite-3275bbf01b79eefb77861cca1fa4fd79c6ae1403.tar.zst
cuberite-3275bbf01b79eefb77861cca1fa4fd79c6ae1403.zip
-rw-r--r--lib/inifile/iniFile.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/inifile/iniFile.cpp b/lib/inifile/iniFile.cpp
index 7515483df..0c208b953 100644
--- a/lib/inifile/iniFile.cpp
+++ b/lib/inifile/iniFile.cpp
@@ -449,7 +449,7 @@ bool cIniFile::SetValueI(const AString & a_KeyName, const AString & a_ValueName,
bool cIniFile::SetValueI(const AString & a_Keyname, const AString & a_ValueName, const Int64 a_Value, const bool a_CreateIfNotExists)
{
- return SetValue(a_Keyname, a_ValueName, Printf("lld", a_Value), a_CreateIfNotExists);
+ return SetValue(a_Keyname, a_ValueName, Printf("%lld", a_Value), a_CreateIfNotExists);
}
@@ -584,7 +584,10 @@ Int64 cIniFile::GetValueSetI(const AString & keyname, const AString & valuename,
{
AString Data;
Printf(Data, "%lld", defValue);
- return std::stoll(GetValueSet(keyname, valuename, Data));
+ Astring resultstring = GetValueSet(keyname, valuename, Data);
+ Int64 result;
+ sscanf(resultstring.c_str(), "%lld", &result);
+ return result;
}