you checked just FIGHTING(d->character) but you also use
FIGHTING(FIGHTING(...))
and the condition you're taking specifically excludes POS_FIGHTING...
so...
> if (CAN_SEE(d->character, FIGHTING(d->character))) {
> sprintf(prompt + strlen(prompt), " T: %s ",
> GET_NAME(FIGHTING(FIGHTING(d->character))));
> /* Above is crashing the mud? Thats what MSCV++ 6.0 says anyways, I don't
> see how..... -- Tiznor */
> } else
> sprintf(prompt + strlen(prompt), " T: Someone ");
> }
What if FIGHTING(d->character) is true but FIGHTING(FIGHTING(d->character))
is null? There is a distinct possibility of this since
FIGHTING(d->character) is mortally wounded and not in POS_FIGHTING.
Note it could be possible anyhow.
It goes without saying, you can't dereference a null pointer.
check your bases, sprinkle with asserts() + using debug mode if you need
to
-Mysid
--
+---------------------------------------------------------------+
| FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
| Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
+---------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 06/24/03 PDT