Browse Source

Nuke some `snprintf`

Adam Johnson 12 years ago
parent
commit
798764d84e
  1. 5
      Sources/Plasma/PubUtilLib/plAudio/plWin32StreamingSound.cpp
  2. 5
      Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgr.cpp

5
Sources/Plasma/PubUtilLib/plAudio/plWin32StreamingSound.cpp

@ -346,9 +346,8 @@ bool plWin32StreamingSound::LoadSound( bool is3D )
IRefreshEAXSettings( true ); IRefreshEAXSettings( true );
// Debug info // Debug info
char str[ 256 ]; plString dbg = plString::Format(" Streaming %s.", fSrcFilename.AsString().c_str());
snprintf( str, arrsize(str), " Streaming %s.", fSrcFilename.AsString().c_str() ); IPrintDbgMessage(dbg.c_str());
IPrintDbgMessage( str );
plStatusLog::AddLineS( "audioTimes.log", 0xffffffff, "Streaming %4.2f secs of %s", plStatusLog::AddLineS( "audioTimes.log", 0xffffffff, "Streaming %4.2f secs of %s",
fDataStream->GetLengthInSecs(), GetKey()->GetUoid().GetObjectName().c_str() ); fDataStream->GetLengthInSecs(), GetKey()->GetUoid().GetObjectName().c_str() );

5
Sources/Plasma/PubUtilLib/plNetClient/plNetClientMgr.cpp

@ -1235,9 +1235,8 @@ void plNetClientMgr::IDisableNet () {
if (!GetFlagsBit(plNetClientApp::kPlayingGame)) if (!GetFlagsBit(plNetClientApp::kPlayingGame))
{ {
// KI may not be loaded // KI may not be loaded
char title[256]; plString title = plString::Format("%s Error", plProduct::CoreName().c_str());
snprintf(title, arrsize(title), "%s Error", plProduct::CoreName().c_str()); hsMessageBox(fDisableMsg->str, title.c_str(), hsMessageBoxNormal, hsMessageBoxIconError );
hsMessageBox(fDisableMsg->str, title, hsMessageBoxNormal, hsMessageBoxIconError );
plClientMsg *quitMsg = new plClientMsg(plClientMsg::kQuit); plClientMsg *quitMsg = new plClientMsg(plClientMsg::kQuit);
quitMsg->Send(hsgResMgr::ResMgr()->FindKey(kClient_KEY)); quitMsg->Send(hsgResMgr::ResMgr()->FindKey(kClient_KEY));
} }

Loading…
Cancel
Save