I am having a bug with cmd edit, can anyone help with this bug.:
Here is the version of OLC I have:
#define OLC_VERSION "ILAB Online Creation [Beta 1.0, ROM 2.3 modified]\n\r"
\
" Port a ROM 2.4 v2.01\n\r"
#define ED_FUN_DEC(blah) bool blah ( char * n_fun, CHAR_DATA *ch, char
*argument, void *arg, const void *par )
ED_FUN_DEC(ed_flag_set_long)
{
long value;
if ( !emptystring(argument) )
{
if ( ( value = flag_value( (struct flag_type *) par, argument ) ) !=
NO_FLAG )
{
/*bug line*/
* (long *) arg = value;
printf_to_char( ch, "%c%s flag set.\n\r",
toupper(n_fun[0]),
&n_fun[1] );
return TRUE;
}
}
printf_to_char( ch, "Syntax : %s [flags]\n\r", n_fun );
return FALSE;
}
Ok, what it is doing is when it hits that * (long *) arg = value; it sets
the name of the cmd_table[working command +1] to '\0' which instructs the
mud that is the end of the command table. I hope I have given you enough
information. I placed it though the gdb many many times, the furthest I got
was to this line.
I tried
arg = (void *) value; (that didn't change the flag anymore)
(int *) arg = value; " " " " " "
(long *) arg = value; " " " " " "
Zartha