diff --git a/source/sw/src/game.cpp b/source/sw/src/game.cpp index 20d3f3a40..5468b1f2c 100644 --- a/source/sw/src/game.cpp +++ b/source/sw/src/game.cpp @@ -2921,7 +2921,7 @@ _Assert(const char *expr, const char *strFile, unsigned uLine) MONO_PRINT(ds); TerminateGame(); #if 1 //def RENDERTYPEWIN - wm_msgbox(apptitle, ds); + wm_msgbox(apptitle, "%s", ds); #else printf("Assertion failed: %s\n %s, line %u\n", expr, strFile, uLine); #endif @@ -2946,7 +2946,7 @@ _ErrMsg(const char *strFile, unsigned uLine, const char *format, ...) va_start(arglist, format); Bvsnprintf(msg, sizeof(msg) - (p-msg), format, arglist); va_end(arglist); - wm_msgbox(apptitle, msg); + wm_msgbox(apptitle, "%s", msg); } #else printf("Error: %s, line %u\n", strFile, uLine); @@ -4903,7 +4903,7 @@ void GetConInput(PLAYERp pp) KB_ClearKeysDown(); KB_FlushKeyboardQueue(); CONTROL_ClearButton(gamefunc_Inventory); - CON_ConMessage(MessageInputString); + CON_ConMessage("%s", MessageInputString); CON_ProcessUserCommand(); // Check to see if it's a cheat or command conbot += 6; diff --git a/source/sw/src/jnstub.cpp b/source/sw/src/jnstub.cpp index 01aec9d5f..dd24b7236 100644 --- a/source/sw/src/jnstub.cpp +++ b/source/sw/src/jnstub.cpp @@ -1431,7 +1431,7 @@ static void sw_printmessage256(const char *text) static void sw_printmessage16(const char *text) { lastpm16time = totalclock; - _printmessage16(text); + _printmessage16("%s", text); } void @@ -3582,10 +3582,7 @@ ShowNextTag(void) return; printmessage16(" "); - - sprintf(tempbuf, "Next tag = %d", siNextEndTag); - printmessage16(tempbuf); - + printmessage16("Next tag = %d", siNextEndTag); } void diff --git a/source/sw/src/sounds.cpp b/source/sw/src/sounds.cpp index 9a5e2b4c9..a3959c4be 100644 --- a/source/sw/src/sounds.cpp +++ b/source/sw/src/sounds.cpp @@ -753,7 +753,7 @@ SWBOOL CacheSound(int num, int type) if (!OpenSound(vp, &handle, &length)) { sprintf(ds,"Could not open sound %s, num %d, priority %d\n",vp->name,num,vp->priority); - CON_ConMessage(ds); + CON_ConMessage("%s", ds); return FALSE; } diff --git a/source/sw/src/sprite.cpp b/source/sw/src/sprite.cpp index e1a807fd1..6e409b860 100644 --- a/source/sw/src/sprite.cpp +++ b/source/sw/src/sprite.cpp @@ -5789,7 +5789,7 @@ KeyMain: sprintf(ds,"Fortune Say: %s\n",ReadFortune[STD_RANDOM_RANGE(10)]); else sprintf(ds,"Fortune Say: %s\n",ReadFortune[STD_RANDOM_RANGE(MAX_FORTUNES)]); - CON_Message(ds); + CON_Message("%s", ds); } SetFadeAmt(pp,ITEMFLASHAMT,ITEMFLASHCLR); // Flash blue on item pickup diff --git a/source/sw/src/text.cpp b/source/sw/src/text.cpp index 9d5faaf10..86a3a4b4e 100644 --- a/source/sw/src/text.cpp +++ b/source/sw/src/text.cpp @@ -461,7 +461,7 @@ void PutStringInfo(PLAYERp pp, const char *string) if (!gs.Messages) return; - CON_ConMessage(string); // Put it in the console too + CON_ConMessage("%s", string); // Put it in the console too PutStringInfoLine(pp, string); }