From dc90561245776245409f2a3ab0584ef2437109fb Mon Sep 17 00:00:00 2001 From: gsoares Date: Sat, 8 Apr 2017 22:59:09 +0000 Subject: [PATCH] snprintf() format string should be literal avoid compiler silly warnings sure deraadt@ --- games/hack/hack.end.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/games/hack/hack.end.c b/games/hack/hack.end.c index e4d4c4c5f18..d628148a8cd 100644 --- a/games/hack/hack.end.c +++ b/games/hack/hack.end.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hack.end.c,v 1.16 2016/01/09 21:54:11 mestre Exp $ */ +/* $OpenBSD: hack.end.c,v 1.17 2017/04/08 22:59:09 gsoares Exp $ */ /* * Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica, @@ -536,7 +536,7 @@ outentry(int rank, struct toptenentry *t1, int so) char hpbuf[10]; int hppos; bp = eos(linebuf); - snprintf(hpbuf, sizeof hpbuf, (t1->hp > 0) ? itoa(t1->hp) : "-"); + snprintf(hpbuf, sizeof hpbuf, "%s", (t1->hp > 0) ? itoa(t1->hp) : "-"); hppos = COLNO - 7 - strlen(hpbuf); if(bp <= linebuf + hppos) { while(bp < linebuf + hppos) *bp++ = ' '; -- 2.20.1