dying in a shop while wielding two weapons could cause "Setworn: mask" warning
make score file processing more bullet proof to avoid potential security issue
towel equipped in weapon, alternate weapon, or quiver slot can be applied
+lit candle or potion of oil which burned out while equipped would leave stale
+ weapon/alternate-weapon/quiver pointer that could cause panic or crash
Platform- and/or Interface-Specific Fixes
-/* SCCS Id: @(#)timeout.c 3.5 2007/02/05 */
+/* SCCS Id: @(#)timeout.c 3.5 2007/03/15 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
if (menorah) {
obj->spe = 0; /* no more candles */
} else if (Is_candle(obj) || obj->otyp == POT_OIL) {
- /* get rid of candles and burning oil potions */
+ /* get rid of candles and burning oil potions;
+ we know this object isn't carried by hero */
obj_extract_self(obj);
obfree(obj, (struct obj *)0);
obj = (struct obj *) 0;
}
}
end_burn(obj, FALSE); /* turn off light source */
- obj_extract_self(obj);
- obfree(obj, (struct obj *)0);
+ if (carried(obj)) {
+ useupall(obj);
+ } else {
+ obj_extract_self(obj);
+ obfree(obj, (struct obj *)0);
+ }
obj = (struct obj *) 0;
break;
if (menorah) {
obj->spe = 0;
} else {
- obj_extract_self(obj);
- obfree(obj, (struct obj *)0);
+ if (carried(obj)) {
+ useupall(obj);
+ } else {
+ obj_extract_self(obj);
+ obfree(obj, (struct obj *)0);
+ }
obj = (struct obj *) 0;
}
break;