[CF-Devel] Alchemy exploit

crossfire-devel at archives.real-time.com crossfire-devel at archives.real-time.com
Tue Aug 24 01:46:24 CDT 2004


Andreas Kirschbaum wrote:
>
     
      Mark Wedel wrote:
     
     >
     
     
     >>
     
     That's sort of an odd approach to take. I'd think the easier fix is to
     
     >>
     
     just use the right format (%d) instead of doing casts.
     
     >
     
     
     >
     
     
     >
     
      OK, I will do that. (But I noticed that the assumption in global.h that
     
     >
     
      an "unsigned int" (uint32) can hold at least 32 bits is not valid
     
     >
     
      according to the C standard.)
     
     
  True - but the main point being that if different systems/OS's/whatever 
require different typedefs, that could be coded in and only one place needs to 
be updated - this is certainly much better than having 'unsigned ints' or 
whatever sprinkled all through the code.

>
     
     
     >
     
     
     >
     
     
     >>
     
     Actually, something like an F_IDENTIFIED that is another flag that can
     
     >>
     
     be orred with the other ones makes more sense, like the F_NO_BARGAIN
     
     >>
     
     is.
     
     >
     
     
     >
     
     
     >
     
      Because I could not invent a flag name for "identified and not cursed",
     
     >
     
      I simply defined two independent flags: F_IDENTIFIED (pretend
     
     >
     
      FLAG_IDENTIFIED to be set) and F_NOT_CURSED (pretend FLAG_CURSED and
     
     >
     
      FLAG_DAMNED to be unset).
     
     
  Well, that is fine - multiple flags is easier/better than having a flag like 
(FLAG_WANT_TO_SELL) which means many things, because you could get a case where 
someone wants the second case you mention and not the first, or vice versa, etc.


_______________________________________________
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