-/* $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,
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++ = ' ';