diff options
author | Nayd <dnpd.dd@gmail.com> | 2014-11-26 02:03:30 +0000 |
---|---|---|
committer | Nayd <dnpd.dd@gmail.com> | 2014-11-26 02:12:38 +0000 |
commit | a1d4c9f9dc14352a108339e006d3f17e88de1672 (patch) | |
tree | 59f4ac48c70fc74e6bf9321dc318dddfef46200b /src/server/shared/Common.h | |
parent | ed3970690ccf6832ac93d1e9ecb95820794ebbad (diff) |
Core: Use the correct function to convert strings to unsigned longs and unsigned long longs
Fixes wrong data being inserted into the database (i.e explored zones).
More info in #13493
Fixes #13493
Thanks to @jackpoz for finding the code issue and @Vavehl for an expectional bug report.
Diffstat (limited to 'src/server/shared/Common.h')
-rw-r--r-- | src/server/shared/Common.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/server/shared/Common.h b/src/server/shared/Common.h index 4bd4d16a6d7..578bc7aa61f 100644 --- a/src/server/shared/Common.h +++ b/src/server/shared/Common.h @@ -79,6 +79,9 @@ inline float finiteAlways(float f) { return std::isfinite(f) ? f : 0.0f; } +inline unsigned long atoul(char const* str) { return strtoul(str, nullptr, 10); } +inline unsigned long long atoull(char const* str) { return strtoull(str, nullptr, 10); } + #define STRINGIZE(a) #a enum TimeConstants |