From a1d4c9f9dc14352a108339e006d3f17e88de1672 Mon Sep 17 00:00:00 2001 From: Nayd Date: Wed, 26 Nov 2014 02:03:30 +0000 Subject: 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. --- src/server/game/Tools/PlayerDump.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/server/game/Tools/PlayerDump.cpp') 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 -- cgit v1.2.3