Bug: Using mudprog editor while in a relation lock causes a crash.
Danger: Critical - Game will crash due to corrupt string data.
Discovered in: AFKMud 1.77
Found by: Halcyon
Fixed by: Halcyon
if( !ch->desc )
send_to_char( "You have no descriptor\r\n", ch );
switch( ch->substate )
Add the following directly after that:
send_to_char( "You can't use this command from within another command.\r\n", ch );
Repeat the same for do_mpedit and do_rpedit.
A relation lock is when you are using one of the "on" modes, such as "oset <obj> on". While in these modes it is generally not a good idea to use other OLC editing commands that manipulate text buffers. In this particular case, it has been found that string data in the hash is corrupted, which leads to a crash several seconds later even though the edit itself "worked". This kind of thing is difficult to track down to the source, so it is best to just use the subrestriction code to prevent it.