[CF-Devel] Common/loader.[lc] bug, player file corruption ahead

crossfire-devel-admin at archives.real-time.com crossfire-devel-admin at archives.real-time.com
Tue Oct 14 01:33:38 CDT 2003


Nicolas Weeger wrote:
>
     
      Morning.
     
     >
     
     
     >
     
      Katia helped me trace the cause of the weird bug on 
     
     >
     
      crossfire.metalforge.net
     
     >
     
     
     >
     
      Here are some weird things, in loader.c (so in .l):
     
     >
     
      * line 5594:
     
     >
     
          FAST_SAVE_LONG(fastbuf,"subtype ",op->subtype,2);
     
     >
     
                                                       ^^^
     
     >
     
      should be 8, obviously. And that, i think, may break things later on.
     
     
  Yeah, that is wrong.  Really, all the fast_save routines should be coded to do 
a strlen of the passed string.

>
     
     
     >
     
      * line 5550:
     
     >
     
          sprintf(buf2,"%lld\n", op->stats.exp);
     
     >
     
      the \n shouldn't be there, i think, adds newline in file (not major 
     
     >
     
      issue though, prolly)
     
     >
     
     
     >
     
      * line 5555: same thing
     
     
  Yeah, extra blank lines don't really harm anything.

>
     
     
     >
     
      The most serious is the first thing, I correct it right away in CVS.
     
     >
     
      I fix loader.l & loader.c (i fix manually the .c, assuming it's uptodate 
     
     >
     
      with .l).
     
     >
     
      (flame me if i shouldn't have)
     
     >
     
     
     >
     
      Side note: the addexp dm command adds overall exp, but not to readied 
     
     >
     
      skill...
     
     
  addexp should be modified to take a paramater on what skill to to reward exp to.



_______________________________________________
crossfire-devel mailing list
     
     crossfire-devel at lists.real-time.com
     
     
     https://mailman.real-time.com/mailman/listinfo/crossfire-devel
     
     
    


More information about the crossfire mailing list