Merge pull request #9008 from krofna/krefixes

Too small buffer fail
This commit is contained in:
Nay
2013-01-22 06:54:51 -08:00

View File

@@ -238,9 +238,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