Samson,
There seems to be a problem with using morph in SMAUG. I was playing with polymorph recently, and created a new polymorph, like this:
Then I used it on myself:
However if I then do something like:
MUD crash!
It appears from using gdb that the problem is here:
This is line 3006 of comm.c, inside act_string function.
The reason for the crash is "i" is NULL.
The reason i is NULL is this define:
In my example, I hadn't set up morph->short_desc and thus it was NULL.
I suggest a change of either:
There seems to be a problem with using morph in SMAUG. I was playing with polymorph recently, and created a new polymorph, like this:
morphcreate fish
Then I used it on myself:
c polymorph fish
However if I then do something like:
goto some-player-name
MUD crash!
It appears from using gdb that the problem is here:
while( ( *point = *i ) != '\0' )
++point, ++i;
This is line 3006 of comm.c, inside act_string function.
The reason for the crash is "i" is NULL.
The reason i is NULL is this define:
#define MORPHNAME(ch) ((ch->morph&&ch->morph->morph)? \
ch->morph->morph->short_desc: \
IS_NPC(ch) ? ch->short_descr : ch->name)
In my example, I hadn't set up morph->short_desc and thus it was NULL.
I suggest a change of either:
- Making the define fallback to the name if the short description is NULL; or
- Make morphcreate supply a default short name (eg. the morph name).