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:
@@ -54,7 +54,7 @@ LDFBaseData * LDFBaseData::DataFromString(const std::string& format) {
|
||||
}
|
||||
|
||||
case LDF_TYPE_S32: {
|
||||
int32_t data = static_cast<int32_t>(stol(dataArray[1]));
|
||||
int32_t data = static_cast<int32_t>(stoull(dataArray[1]));
|
||||
return new LDFData<int32_t>(key, data);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user