[crossfire] Strange code in server/weather.c
Nicolas Weeger
nicolas.weeger at laposte.net
Thu Apr 14 08:19:40 CDT 2005
Hello.
Browsing weather.c code (yeah, i'm bored at work ^.^;;;), I noticed two strange things:
* weathermap_to_worldmap_corner uses malloc() to get memory for the map path, but it isn't freed later on. This can lead to (small) memory leaks at each weather iteration.
* in worldmap_to_weathermap( ), this code is weird:
char* filename=m->path;
<3 lines snipped out>
while (*filename == '/')
*filename++;
It should probably read 'filename++'. Probably not a big issue, but still - changing the map filename is *definitely* not a good idea.
If no one does it before me, I'll fix that in the next few days.
Ryo
Accédez au courrier électronique de La Poste : www.laposte.net ;
3615 LAPOSTENET (0,34/mn) ; tél : 08 92 68 13 50 (0,34/mn)
More information about the crossfire
mailing list