» SmaugMuds » Bugfix Lists » AFKMud Bugfix List » AFKMud Bug Archive » [Bug] Wearing an item with on...
[Bug] Wearing an item with only a hold flag will crash the game
< Newer Topic
:: Older Topic >
AFKMud 1.77
Pages:<< prev 1 next >>
#1 Nov 5, 2006 1:28 pm
Black Hand
GroupAdministrators
Posts3,685
JoinedJan 1, 2002
Bug: Wearing an item with only a hold flag will crash the game
Danger: Medium - Immediate crash, but only under select circumstances
Discovered in: AFKMud 1.77
Found by: Kazro
Fixed by: Samson
---
act_obj.c, wear_obj
Locate:
Change to:
A classic oversight of not checking to make sure that a previous return value wasn't NULL before checking the attributes on it.
Danger: Medium - Immediate crash, but only under select circumstances
Discovered in: AFKMud 1.77
Found by: Kazro
Fixed by: Samson
---
act_obj.c, wear_obj
Locate:
if( IS_OBJ_FLAG( tmpobj, ITEM_TWOHAND ) ) { send_to_char( "You cannot hold something while wielding a two-handed weapon!\n\r", ch ); return; }
Change to:
if( tmpobj && IS_OBJ_FLAG( tmpobj, ITEM_TWOHAND ) ) { send_to_char( "You cannot hold something while wielding a two-handed weapon!\r\n", ch ); return; }
A classic oversight of not checking to make sure that a previous return value wasn't NULL before checking the attributes on it.
Pages:<< prev 1 next >>