|
This one is a pretty simple fix to an obscure function (who uses the trace
command?) and is here compliments of TheMentor.
The problem in question is due to an error in tracecom() which is located in wizard.c. Turning a trace on is easy; turning off the trace usually results in a SIGSEGV. Looking in stock iDirt 1.82, we see this in tracecom:
if (cur_player->Trace.trace != -1) {
bprintf ("Stopped tracing %s (%d).\n", cur_player->Trace.is_obj ?
oname (cur_player->Trace.trace) :
pname (cur_player->Trace.trace - GLOBAL_MAX_OBJS),
cur_player->Trace.trace);
cur_player->Trace.trace = -2;
}
The problem line is the fourth line displayed here, where we subtract GLOBAL_MAX_OBJS. Bad move. That's the step that turns the tracing value into some indecipharable piece of information that sends us deep off into SIGSEGV land. Changing the line to this
pname (cur_player->Trace.trace),
results in code which works. |