Small fix for Database::StoreCharacter for MSVC
VS.NET Professional 2005 builds of eqemu seem to barf when provided a very large color number for an item (namely the default value) as it's above the signed max value. As the number is stored as a uint32, that shouldn't be a problem, but the StoreCharacter command uses a format string with %d as the value for the number.
On at least my install of VS.NET 2k5, this causes the number to be automatically cast to a signed int, converting it to a bad value, which MySQL complains (in strict mode) is out of range. A simple fix is replacing the values which might be very large with %0u rather than %d fixes this without complaint in STRICT mode. Also of note is that the query string is deleted before the debug message about the query string, resulting in a debug message which says that query "<NULL>" is invalid. Original code at line database.cpp 557-571 Code:
MakeAnyLenString Code:
MakeAnyLenString |
All times are GMT -4. The time now is 09:31 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.