Re: Error Help, Please ;)

From: The Arrow (pt94jpi@student.hk-r.se)
Date: 02/13/97


On Thu, 13 Feb 1997, Shaw J wrote:

> Dalamar wrote:
[SNIP]
>     if (*tmp == '!')
>       strcpy(tmp, t->last_input);
>     else if (*tmp == '^') {
>       if (!(failed_subst = perform_subst(t, t->last_input, tmp)))
>         strcpy(t->last_input, tmp);
>     } else
>       strcpy(t->last_input, tmp);
> 
>     if (!failed_subst)
>       write_to_q(tmp, &t->input, 0);
> 
> ->  sprintf(buf, "%s:%s", GET_NAME(t->character), tmp);
> ->  log(buf);
> 
>     /* find the end of this line */
>     while (ISNEWL(*nl_pos))
>       nl_pos++;

If I remeber correctly, non-playing descriptors don't have a character
connected to them, i.e. t->character == NULL.
Add a check for that, and I guess it will work.

/ Joachim
------------------------------------------------------------------------
  The Arrow              Arrow@Shadow World - mud.fukt.hk-r.se 4000

  Joachim Pileborg       Email: pilen@fukt.hk-r.se
  Tranbärsvägen 22:19
  37238 Ronneby          http://www.fukt.hk-r.se/~pilen/
  SWEDEN
------------------------------------------------------------------------

+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
|    Or send 'info circle' to majordomo@cspo.queensu.ca     |
+-----------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/18/00 PST