From: nethack.allison Date: Sat, 10 May 2003 15:25:33 +0000 (+0000) Subject: ensure safe_qbuf gets initialized buffer as 1st arg X-Git-Tag: MOVE2GIT~2007 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f32ad24709f414e717df72166216f764461d80a5;p=nethack ensure safe_qbuf gets initialized buffer as 1st arg --- diff --git a/src/apply.c b/src/apply.c index 26e28dfcf..dd3de53ec 100644 --- a/src/apply.c +++ b/src/apply.c @@ -2564,7 +2564,7 @@ do_break_wand(obj) Strcpy(the_wand, yname(obj)); Sprintf(confirm, "Are you really sure you want to break %s?", - safe_qbuf(confirm, sizeof("Are you really sure you want to break ?"), + safe_qbuf("", sizeof("Are you really sure you want to break ?"), the_wand, ysimple_name(obj), "the wand")); if (yn(confirm) == 'n' ) return 0; diff --git a/src/pickup.c b/src/pickup.c index e64c51d55..73995609c 100644 --- a/src/pickup.c +++ b/src/pickup.c @@ -539,7 +539,7 @@ menu_pickup: if (!all_of_a_type) { char qbuf[BUFSZ]; Sprintf(qbuf, "Pick up %s?", - safe_qbuf(qbuf, sizeof("Pick up ?"), doname(obj), + safe_qbuf("", sizeof("Pick up ?"), doname(obj), an(simple_typename(obj->otyp)), something)); switch ((obj->quan < 2L) ? ynaq(qbuf) : ynNaq(qbuf)) { case 'q': goto end_query; /* out 2 levels */ @@ -1479,7 +1479,7 @@ lootcont: if (Is_container(cobj)) { Sprintf(qbuf, "There is %s here, loot it?", - safe_qbuf(qbuf, sizeof("There is here, loot it?"), + safe_qbuf("", sizeof("There is here, loot it?"), doname(cobj), an(simple_typename(cobj->otyp)), "a container")); c = ynq(qbuf);