openbsd-ports/games/xsoldier/patches/patch-opening_c

17 lines
681 B
Plaintext

$OpenBSD: patch-opening_c,v 1.2 2005/10/21 20:07:05 naddy Exp $
--- opening.c.orig Thu Oct 20 07:24:10 2005
+++ opening.c Thu Oct 20 07:24:37 2005
@@ -95,10 +95,10 @@ int Opening(void)
{
draw_string(120, 330+i*25, player->Rec[i].name,
strlen(player->Rec[i].name));
- sprintf(buff,"%2d-%2d",player->Rec[i].loop,
+ snprintf(buff, sizeof(buff), "%2d-%2d",player->Rec[i].loop,
player->Rec[i].stage);
draw_string(270, 330+i*25, buff, strlen(buff));
- sprintf(buff,"%8d",player->Rec[i].score);
+ snprintf(buff, sizeof(buff), "%8d",player->Rec[i].score);
draw_string(350, 330+i*25, buff, strlen(buff));
}
}