[CF-Devel] Uninitialized variable

crossfire-devel at archives.real-time.com crossfire-devel at archives.real-time.com
Thu Jan 6 17:20:44 CST 2005


Hello.

In server/player.c around line 1385:

	for (attacknum=0; attacknum < NROFATTACKS;
	     attacknum++, attacktype = 1<<attacknum)
	    if (arrow->attacktype & attacktype)
		if (target->arch->clone.resist[attacknum] < 0)

with 'attacktype' not initialized beforehand.
Compiler reports use of attacktype without initialization, which is 
quite plausible as its value is set only after the first loop execution.

Not sure what to put as initial value, though.

Nicolas

_______________________________________________
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