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/game/Tools/PlayerDump.cpp | |
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/game/Tools/PlayerDump.cpp')
-rw-r--r-- | src/server/game/Tools/PlayerDump.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/game/Tools/PlayerDump.cpp b/src/server/game/Tools/PlayerDump.cpp index 6f42d41c694..43d4374c544 100644 --- a/src/server/game/Tools/PlayerDump.cpp +++ b/src/server/game/Tools/PlayerDump.cpp @@ -519,10 +519,10 @@ DumpReturn PlayerDumpReader::LoadDump(std::string const& file, uint32 account, s if (!changenth(line, 2, chraccount)) // characters.account update ROLLBACK(DUMP_FILE_BROKEN); - race = uint8(atol(getnth(line, 4).c_str())); - playerClass = uint8(atol(getnth(line, 5).c_str())); - gender = uint8(atol(getnth(line, 6).c_str())); - level = uint8(atol(getnth(line, 7).c_str())); + race = uint8(atoul(getnth(line, 4).c_str())); + playerClass = uint8(atoul(getnth(line, 5).c_str())); + gender = uint8(atoul(getnth(line, 6).c_str())); + level = uint8(atoul(getnth(line, 7).c_str())); if (name.empty()) { // check if the original name already exists |