Re: Memory corruption :(

From: Will Andrews (andrews@TECHNOLOGIST.COM)
Date: 02/06/99

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) {
        other checks here?

>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!).


--Acme, Maintenance Implementor & Demi-Coder [NIC: WA915]
The Black Dawn -- -- telnet://

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  |

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