Re: Memory corruption :(

From: Matthew Lowe (modem-burn@geocities.com)
Date: 02/06/99


Umm, This could be very stupid but aren't objects that are -1 supose to
be NOTHING... I belive thats what NOTHING is defined as. This could
possible be your problem. In which case is probably a corpse of a
creature. And if corpses do not apply just add a check as noted by the
previous poster (see below)
Jourge

Will Andrews wrote:
>
> At 08:36 PM 2/5/99 +0100, you wrote:
> >Hi everybody!
> >
> >for (j = object_list; j; j = next_thing) {
> >    next_thing = j->next;                              /* this is close
>
> I have a suggestion, if the item_number becomes negative, tell the for loop
> to skip to the next one like so:
>
> for (j = object_list; j; j = next_thing) {
>         next_thing = j->next;
>         // or whatever item_number is known as:
>         // also, you may not want an item_number of 0.
>         if (next_thing.item_number <= 0) {
>                 continue;
>         }
>         other checks here?
>         whatever..
>         .
>         .
> }
>
> >object suddenly has gotten a negative item_number. Anybody knows how
> >this is possible and why it can happen?
>
> Another possibility is that your object listing is corrupted.. or that you
> have your *.obj files loading in the wrong order (they *must* be loaded
> according to number, as do other databases!).
>
> Toodles.
>
> --Acme, Maintenance Implementor & Demi-Coder [NIC: WA915]
> The Black Dawn -- http://www.blackdawn.com/ -- telnet://blackdawn.com:4000
>
>      +------------------------------------------------------------+
>      | Ensure that you have read the CircleMUD Mailing List FAQ:  |
>      |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
>      +------------------------------------------------------------+


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



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