fix several printf format string errors in games' code

Submitted by: Ozkan Sezer
This commit is contained in:
Yamagi Burmeister 2015-08-31 18:36:18 +02:00
parent 40183c82ae
commit be3472d045
3 changed files with 15 additions and 15 deletions

View file

@ -145,7 +145,7 @@ Sys_Error(char *error, ...)
vsprintf(text, error, argptr);
va_end(argptr);
gi.error(ERR_FATAL, "%s", text);
gi.error("%s", text);
}
void

View file

@ -795,7 +795,7 @@ SV_Physics_Pusher(edict_t *ent)
if (pushed_p > &pushed[MAX_EDICTS])
{
gi.error(ERR_FATAL, "pushed_p > &pushed[MAX_EDICTS], memory corrupted");
gi.error("pushed_p > &pushed[MAX_EDICTS], memory corrupted");
}
if (part)

View file

@ -238,8 +238,8 @@ InitGame(void)
/* items */
InitItems ();
Com_sprintf (game.helpmessage1, sizeof(game.helpmessage1), "");
Com_sprintf (game.helpmessage2, sizeof(game.helpmessage2), "");
game.helpmessage1[0] = 0;
game.helpmessage2[0] = 0;
/* initialize all entities for this game */
game.maxentities = maxentities->value;
@ -641,7 +641,7 @@ ReadField(FILE *f, field_t *field, byte *base)
if (len > sizeof(funcStr))
{
gi.error ("ReadField: function name is longer than buffer (%i chars)",
sizeof(funcStr));
(int)sizeof(funcStr));
}
fread (funcStr, len, 1, f);
@ -665,7 +665,7 @@ ReadField(FILE *f, field_t *field, byte *base)
if (len > sizeof(funcStr))
{
gi.error ("ReadField: mmove name is longer than buffer (%i chars)",
sizeof(funcStr));
(int)sizeof(funcStr));
}
fread (funcStr, len, 1, f);