mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 09:17:36 +01:00
Too small buffer fail
This commit is contained in:
@@ -237,9 +237,10 @@ inline void LoadDBC(uint32& availableDbcLocales, StoreProblemList& errors, DBCSt
|
||||
// sort problematic dbc to (1) non compatible and (2) non-existed
|
||||
if (FILE* f = fopen(dbcFilename.c_str(), "rb"))
|
||||
{
|
||||
char buf[100];
|
||||
snprintf(buf, 100, " exists, and has %u field(s) (expected " SIZEFMTD "). Extracted file might be from wrong client version or a database-update has been forgotten.", storage.GetFieldCount(), strlen(storage.GetFormat()));
|
||||
errors.push_back(dbcFilename + buf);
|
||||
std::ostringstream stream;
|
||||
stream << dbcFilename << " exists, and has " << storage.GetFieldCount() << " field(s) (expected " << strlen(storage.GetFormat()) << "). Extracted file might be from wrong client version or a database-update has been forgotten.";
|
||||
std::string buf = stream.str();
|
||||
errors.push_back(buf);
|
||||
fclose(f);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user