[Warzone-dev] 2 Patches again...
Nobody commit these yet again? Something wrong with them? This fix crash compile on MSVC Index: lib/ivis_common/pcx.c === --- lib/ivis_common/pcx.c (revision 1162) +++ lib/ivis_common/pcx.c (working copy) @@ -27,8 +27,7 @@ #include ivispatch.h -static const size_t PNG_BYTES_TO_CHECK = 4; - +#define PNG_BYTES_TO_CHECK 4 static void wzpng_read_data(png_structp ctx, png_bytep area, png_size_t size) { Index: src/gateway.c === --- src/gateway.c (revision 1162) +++ src/gateway.c (working copy) @@ -130,6 +130,7 @@ if (aZoneReachable != NULL) { free(aZoneReachable); + aZoneReachable=NULL; } } @@ -1058,6 +1059,7 @@ if (aNumEquiv) { free(aNumEquiv); + aNumEquiv=NULL; } if (apEquivZones) { @@ -1069,6 +1071,7 @@ } } free(apEquivZones); + apEquivZones=NULL; } gwNumZones = 0; } -- Are you a homeowner in debt? Need cash now? Click here to refinance your mortgage. http://tagline.hushmail.com/fc/CAaCXv1QYGJm5EmL4cL67X0SzmMDG24c/ ___ Warzone-dev mailing list Warzone-dev@gna.org https://mail.gna.org/listinfo/warzone-dev
Re: [Warzone-dev] 2 Patches again...
[EMAIL PROTECTED] schreef: Nobody commit these yet again? Something wrong with them? This fix crash compile on MSVC Index: lib/ivis_common/pcx.c === --- lib/ivis_common/pcx.c (revision 1162) +++ lib/ivis_common/pcx.c (working copy) @@ -27,8 +27,7 @@ #include ivispatch.h -static const size_t PNG_BYTES_TO_CHECK = 4; - +#define PNG_BYTES_TO_CHECK 4 static void wzpng_read_data(png_structp ctx, png_bytep area, png_size_t size) { Just applied the patch to gateway.c (r1163). As for your patch to PNG_BYTES_TO_CHECK, I'm not sure using the preprocessor as a replacement for the compiler is a legal fix here. Yes it gets the code to compile, but at the cost of type safety and some compiler optimizations. Could you check if including stddef.h fixes compiling there. -- Giel signature.asc Description: OpenPGP digital signature ___ Warzone-dev mailing list Warzone-dev@gna.org https://mail.gna.org/listinfo/warzone-dev
Re: [Warzone-dev] 2 Patches again...
On Sun, 22 Apr 2007 17:54:05 -0400 Giel van Schijndel [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] schreef: Nobody commit these yet again? Something wrong with them? This fix crash compile on MSVC Index: lib/ivis_common/pcx.c === --- lib/ivis_common/pcx.c(revision 1162) +++ lib/ivis_common/pcx.c(working copy) @@ -27,8 +27,7 @@ #include ivispatch.h -static const size_t PNG_BYTES_TO_CHECK = 4; - +#define PNG_BYTES_TO_CHECK 4 static void wzpng_read_data(png_structp ctx, png_bytep area, png_size_t size) { Just applied the patch to gateway.c (r1163). As for your patch to PNG_BYTES_TO_CHECK, I'm not sure using the preprocessor as a replacement for the compiler is a legal fix here. Yes it gets the code to compile, but at the cost of type safety and some compiler optimizations. Could you check if including stddef.h fixes compiling there. -- Giel No, problem is you can no do array with variable since it C99. So must use the #define. const int Asize = 20; ... ... int array[Asize]; --This is C99. #define Asize 20 ... ... int array[Asize]; This is valid. -- Click for free info on online degrees and make $150K/ year http://tagline.hushmail.com/fc/CAaCXv1S7YontslYqJxRbiofzarNfNEd/ ___ Warzone-dev mailing list Warzone-dev@gna.org https://mail.gna.org/listinfo/warzone-dev