analyzer lint for p*.c
This commit is contained in:
+3
-5
@@ -1493,11 +1493,11 @@ do_screen_description(
|
|||||||
x_str = def_warnsyms[i].explanation;
|
x_str = def_warnsyms[i].explanation;
|
||||||
if (sym == (looked ? gw.warnsyms[i] : def_warnsyms[i].sym)) {
|
if (sym == (looked ? gw.warnsyms[i] : def_warnsyms[i].sym)) {
|
||||||
if (!found) {
|
if (!found) {
|
||||||
Sprintf(out_str, "%s%s", prefix, def_warnsyms[i].explanation);
|
Sprintf(out_str, "%s%s", prefix, x_str);
|
||||||
*firstmatch = def_warnsyms[i].explanation;
|
*firstmatch = x_str;;
|
||||||
found++;
|
found++;
|
||||||
} else {
|
} else {
|
||||||
found += append_str(out_str, def_warnsyms[i].explanation);
|
found += append_str(out_str, x_str);
|
||||||
}
|
}
|
||||||
/* Kludge: warning trumps boulders on the display.
|
/* Kludge: warning trumps boulders on the display.
|
||||||
Reveal the boulder too or player can get confused */
|
Reveal the boulder too or player can get confused */
|
||||||
@@ -1678,7 +1678,6 @@ do_look(int mode, coord *click_cc)
|
|||||||
|
|
||||||
if (!clicklook) {
|
if (!clicklook) {
|
||||||
if (quick) {
|
if (quick) {
|
||||||
from_screen = TRUE; /* yes, we want to use the cursor */
|
|
||||||
i = 'y';
|
i = 'y';
|
||||||
} else {
|
} else {
|
||||||
menu_item *pick_list = (menu_item *) 0;
|
menu_item *pick_list = (menu_item *) 0;
|
||||||
@@ -1843,7 +1842,6 @@ do_look(int mode, coord *click_cc)
|
|||||||
do {
|
do {
|
||||||
/* Reset some variables. */
|
/* Reset some variables. */
|
||||||
pm = (struct permonst *) 0;
|
pm = (struct permonst *) 0;
|
||||||
found = 0;
|
|
||||||
out_str[0] = '\0';
|
out_str[0] = '\0';
|
||||||
|
|
||||||
if (from_screen || clicklook) {
|
if (from_screen || clicklook) {
|
||||||
|
|||||||
+2
-1
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.7 potion.c $NHDT-Date: 1726356849 2024/09/14 23:34:09 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.270 $ */
|
/* NetHack 3.7 potion.c $NHDT-Date: 1737605675 2025/01/22 20:14:35 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.274 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Robert Patrick Rankin, 2013. */
|
/*-Copyright (c) Robert Patrick Rankin, 2013. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -2236,6 +2236,7 @@ hold_potion(
|
|||||||
obj_extract_self(potobj);
|
obj_extract_self(potobj);
|
||||||
/* re-insert into inventory, possibly merging with compatible stack */
|
/* re-insert into inventory, possibly merging with compatible stack */
|
||||||
potobj = hold_another_object(potobj, drop_fmt, drop_arg, hold_msg);
|
potobj = hold_another_object(potobj, drop_fmt, drop_arg, hold_msg);
|
||||||
|
nhUse(potobj);
|
||||||
flags.pickup_burden = save_pickup_burden;
|
flags.pickup_burden = save_pickup_burden;
|
||||||
update_inventory();
|
update_inventory();
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user