![](https://smaugmuds.afkmods.com/skins/default/images/icons/topic.png)
Pages:<< prev 1 next >>
![Post is unread](https://smaugmuds.afkmods.com/skins/default/images/icons/topic.png)
![This member is currently offline](https://smaugmuds.afkmods.com/skins/default/images/icons/user_offline.png)
Black Hand
![](https://smaugmuds.afkmods.com/skins/default/images/7.png)
GroupAdministrators
Posts3,689
JoinedJan 1, 2002
Bug: mptrlook command crashes with an empty target room argument
Danger: High - Crash bug. A missing room argument crashes the game.
Discovered in: AFKMud 2.02
Found by: Samson
Fixed by: Samson
---
mud_comm.cpp, do_mptrlook
Locate:
Change to:
The ifcheck in this small chunk is meant to see if the arg2 value is empty, blank, or otherwise invalid and default to using the room the PC is in as the target. However the check is setup wrong and would actually result in a crash condition if the argument is empty because the location value is then never assigned.
Danger: High - Crash bug. A missing room argument crashes the game.
Discovered in: AFKMud 2.02
Found by: Samson
Fixed by: Samson
---
mud_comm.cpp, do_mptrlook
Locate:
if( arg2 && arg2[0] == '\0' ) location = ch->in_room;
Change to:
if( !arg2 || arg2[0] == '\0' ) location = ch->in_room;
The ifcheck in this small chunk is meant to see if the arg2 value is empty, blank, or otherwise invalid and default to using the room the PC is in as the target. However the check is setup wrong and would actually result in a crash condition if the argument is empty because the location value is then never assigned.
Pages:<< prev 1 next >>