Ascii pfiles 2.0b (Fix and question)

From: Jason Berg (gameguru42@hotmail.com)
Date: 06/10/99


Ok - I've finished patching it into my stock circle and have fixed the few
bugs I've found.  Unfortunatly Hotmail got rid of the first post asking
about the name length bug so if someone could repost a good example of the
effects of the bug I will start to attempt to figure it out.

However I have fixed the do_last, do_set, and do_show bugs and the
everloading character bug (freezes MUD and reads and reads and reads from
the hard drive - caused by aliases).  Here is the info for them.
------------------------------------------------
In load_char (db.c) after #if ASCII_SAVE_ALIASES
change line that reads while(*line != '!') to while(*line != '~')

In act.wizard.c, do_show near case 2: add the following
(before if(load_char(value, vict) < 0) {  )

        CREATE(vict, struct char_data, 1);
    clear_char(vict);
    CREATE(vict->player_specials, struct player_special_data, 1);

Then a bit further down after send_to_char(ch, buf) add:
    free_char(vict);


In act.wizard.c, do_set before the load_char line add:
    CREATE(cbuf->player_specials, struct player_special_data, 1);

In act.wizard.c, do_last before if (load_char(arg, vict) < 0) { add:
        CREATE(vict, struct char_data, 1);
    clear_char(vict);
    CREATE(vict->player_specials, struct player_special_data, 1);
and add free_char(vict); after send_to_char(buf, ch); at end of func
------------------------------------------------------
This will fix all of the bugs that I have found so far.  There is the matter
of diskio.c somehow corrupting the heap when trying to close files in
fbclose_for_read and fbclose_for_write.  It doesn't seem to do anything bad
but MSVC catches it due to the debug versions of malloc and free.  More on
this later.

Once I finish taking the last few bugs out of the pfile system I will write
up an add-on to the patch (Can't actually change the patch as I'm on a
Windows computer, not unix) and will also add my file of how to modify the
patch to make it work on under windows.
Hope this solves your problems! :)
Gameguru


_______________________________________________________________
Get Free Email and Do More On The Web. Visit http://www.msn.com


     +------------------------------------------------------------+
     | 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