[CF-Devel] bug in update_object()

crossfire-devel-admin at archives.real-time.com crossfire-devel-admin at archives.real-time.com
Wed Apr 23 08:06:55 CDT 2003


update_object() in common/object.c is the main update
function for map flags.

There is a variable called "update_now". This variable is
not initialized at function start!

it must be

int update_now=0, flags;

instead of

int update_now, flags;

Funny is, that i missed this bug for ages - but all the times
i wonder about "flags don't match with old flags" warning
in some compile settings from update_position().

If this is fixed, better you do some test runs because this is a long
staying bug and update_object() seems calling update_position() sometimes
with wrong flags, invoking some protests from it.

I really hate this kind of bugs... Sometimes the compilers drop a "used
before
initilized" warnings, but here nothing - not from VC and not from GNU C. And
i
had looked over it alot of times and always missed this and wonder about the
strange unexpected warnings (i thought all the times we have a memory leak
here
or a stack overflow...).


_______________________________________________
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