mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-04 09:44:10 +00:00
Corrected string to long conversion
For Windows, the definition for a long is 32 bits, not 64 bits like on other operating systems. This caused an issue on Windows only where a number larger than 32 bits was attempted to be converted to a long, the WorldServer would crash. This commit replaces all instances of `stol` with `stoull` to further define a long and reduce ambiguity of number length.
This commit is contained in:
@@ -168,7 +168,7 @@ std::map<LOT, uint32_t> CDItemComponentTable::ParseCraftingCurrencies(const CDIt
|
||||
// Checking for 2 here, not sure what to do when there's more stuff than expected
|
||||
if (amountSplit.size() == 2) {
|
||||
currencies.insert({
|
||||
std::stol(amountSplit[0]),
|
||||
std::stoull(amountSplit[0]),
|
||||
std::stoi(amountSplit[1])
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user