mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-14 02:27:40 -04:00
Let's use vsnprintf
for those legacy methods...
This commit is contained in:
@ -202,7 +202,7 @@ void hsStatusMessage(const char message[])
|
||||
void hsStatusMessageV(const char * fmt, va_list args)
|
||||
{
|
||||
char buffer[2000];
|
||||
vsprintf(buffer, fmt, args);
|
||||
vsnprintf(buffer, arrsize(buffer), fmt, args);
|
||||
hsStatusMessage(buffer);
|
||||
}
|
||||
|
||||
|
@ -66,7 +66,7 @@ void PrintStringF(void pfun(const char *),const char * fmt, ...)
|
||||
|
||||
char buffy[512];
|
||||
va_start(args, fmt);
|
||||
vsprintf(buffy, fmt, args);
|
||||
vsnprintf(buffy, arrsize(buffy), fmt, args);
|
||||
va_end(args);
|
||||
pfun(buffy);
|
||||
}
|
||||
|
@ -323,7 +323,7 @@ void PatcherLog(PatcherLogType type, const char* format, ...)
|
||||
if (type == kError)
|
||||
{
|
||||
sLastError = new char[1024]; // Deleted by Finish(false)
|
||||
vsprintf(sLastError, format, args);
|
||||
vsnprintf(sLastError, 1024, format, args);
|
||||
gStatusLog->AddLine(sLastError, color);
|
||||
} else
|
||||
gStatusLog->AddLineV(color, format, args);
|
||||
|
Reference in New Issue
Block a user