Re: [Code] [Stock bug?] write_to_ouput oops. :-)

From: George (greerga@CIRCLEMUD.ORG)
Date: 07/16/98


On Wed, 15 Jul 1998, Tony Robbins wrote:

>BTW, this apparently is a bug in DG pl4.
>
>For room reset triggers, I was getting crashes every few hours, so I put in
>log statements to find out what numbers it was crashing on.  It cycled
>through the room numbers for reset triggers, but apparently this:
>
>if (room_rnum) reset_wtrigger(&world[room_rnum]);
>
>...does not account for rnum of -1 (NOWHERE).  What fixed it for me (no
>more crashes from it, been up for nearly two days), was to change it to:
>
>if (room_rnum != NOWHERE) reset_wtrigger(&world[room_rnum]);
>
>...which as repaired it and the triggers still work.  However, in hindsight
>I wonder, is a room_rnum of 0 legal?  Seems to me it would be, and point to
>Limbo or the Void or whatever.

Yup, this code dies horribly on my glibc-based Linux system but runs fine
on my libc5-based one (but with corruption).  You're correct in that room
number 0 if valid and -1 is not.

Hope this won't become a FAQ. :)

--
George Greer, greerga@circlemud.org | Genius may have its limitations, but
http://patches.van.ml.org/          | stupidity is not thus handicapped.
http://www.van.ml.org/CircleMUD/    |                  -- Elbert Hubbard


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



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