Ok, I have put spell memorization into my code, but when I mstat a player while he is meming a spell, the mud crashes.
Here is my backtrace:
(gdb) bt
#0 0x610cbb60 in strcpy () from /usr/bin/cygwin1.dll
#1 0x610cb9f5 in strcat () from /usr/bin/cygwin1.dll
#2 0x004909fb in ext_flag_string (bitvector=0x101fa814, flagarray=0x48feb0)
at build.c:312
#3 0x004635f3 in do_mstat (ch=0x101f23f8, argument=0x22ea26 "gomer")
at act_wiz.c:2002
#4 0x005266dc in interpret (ch=0x101f23f8, argument=0x22ea26 "gomer")
at interp.c:550
#5 0x004c3f49 in game_loop () at comm.c:632
#6 0x004c31e7 in main (argc=1, argv=0x10010d60) at comm.c:286
In build.c:
char *ext_flag_string( EXT_BV *bitvector, char * const flagarray[] )
{
static char buf[MAX_STRING_LENGTH];
int x;
buf[0] = '\0';
for ( x = 0; x < MAX_BITS ; x++ )
if ( xIS_SET( *bitvector, x ) )
{
strcat( buf, flagarray[x] );
strcat( buf, " " );
}
if ( (x=strlen(buf)) > 0 )
buf[--x] = '\0';
return buf;
}
and my player_flags:
typedef enum
{
PLR_IS_NPC,PLR_BOUGHT_PET, PLR_SHOVEDRAG, PLR_AUTOEXIT, PLR_AUTOLOOT,
PLR_AUTOSAC, PLR_BLANK, PLR_OUTCAST, PLR_BRIEF, PLR_COMBINE, PLR_PROMPT,
PLR_TELNET_GA, PLR_HOLYLIGHT, PLR_WIZINVIS, PLR_ROOMVNUM, PLR_SILENCE,
PLR_NO_EMOTE, PLR_ATTACKER, PLR_NO_TELL, PLR_LOG, PLR_DENY, PLR_FREEZE,
PLR_THIEF, PLR_KILLER, PLR_LITTERBUG, PLR_ANSI, PLR_RIP, PLR_NICE, PLR_FLEE,
PLR_AUTOGOLD, PLR_AUTOMAP, PLR_AFK, PLR_INVISPROMPT, PLR_MEMING, PLR_MEDITATE, PLR_CASTING
} player_flags;
I'm not really sure what's goin on here. Any thoughts?
|