[CF-Devel] Problems running the latest CVS

Mark Wedel mwedel at sonic.net
Tue Sep 24 01:36:43 CDT 2002


Jan Tobias Muehlberg wrote:
>
     
      Hi,
     
     
>
     
      Startup fails with the following messages:
     
     >
     
     
     >
     
      ---------------------------------
     
     >
     
      [...]
     
     >
     
      Questions and bugs should be mailed to above address.
     
     >
     
      Reading artifacts from
     
     >
     
      /home9/user/muehlber/crossfire/server/share/crossfire/artifacts...Object
     
     >
     
      NULL seems to have too low item power? 5 > 1
     
     >
     
      Object NULL seems to have too low item power? 9 > 3
     
     
  Fixed in CVS.  code was passing a null value to a %s printf.  Some OS's will 
detect that a null was passed and substitute an appropriate values.  Others don't.


>
     
      Beside this: When I ran configure I was somewhat happy to see that you
     
     >
     
      are checking for snprintf() now. But you are not using the result of the
     
     >
     
      check, at least in server/spell_effect.c the function was still used. 
     
     >
     
      I fixed it by inserting:
     
     
  I put code in common/porting.c that will define a snprintf if configure 
doesn't detect one.  Since __vsnprintf is probably not very portable, my 
implementation was to juse call vsprintf, and check ret against max - if ret is 
bigger, just abort.

  Arguably, this could be a better replacement is most all cases - I'd have to 
look at all of waht snprintf is currently being used for, but I would guess that 
there are some cases where the code is presuming that the buffer will be fully 
copied, and if the buffer is only partially formed, things may not work right 
anyways.




    
    


More information about the crossfire mailing list