Browse Source

Let's use `vsnprintf` for those legacy methods...

Adam Johnson 12 years ago
parent
commit
470ed86187
  1. 2
      Sources/Plasma/CoreLib/HeadSpin.cpp
  2. 2
      Sources/Plasma/FeatureLib/pfConsoleCore/pfConsoleCommandsCore.cpp
  3. 2
      Sources/Plasma/PubUtilLib/plAgeLoader/plResPatcher.cpp

2
Sources/Plasma/CoreLib/HeadSpin.cpp

@ -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);
}

2
Sources/Plasma/FeatureLib/pfConsoleCore/pfConsoleCommandsCore.cpp

@ -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);
}

2
Sources/Plasma/PubUtilLib/plAgeLoader/plResPatcher.cpp

@ -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);

Loading…
Cancel
Save