]> granicus.if.org Git - nethack/commitdiff
ensure safe_qbuf gets initialized buffer as 1st arg
authornethack.allison <nethack.allison>
Sat, 10 May 2003 15:25:33 +0000 (15:25 +0000)
committernethack.allison <nethack.allison>
Sat, 10 May 2003 15:25:33 +0000 (15:25 +0000)
src/apply.c
src/pickup.c

index 26e28dfcfed302dae4baef2a46df48dbb766683e..dd3de53ec8355f63d354fd5bd52cace33588ac3a 100644 (file)
@@ -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;
 
index e64c51d55f57b4c8812c7d4fb52a616f5b7913dd..73995609c1af18af1cce33e9b49a2f4b27fa6522 100644 (file)
@@ -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);