shithub: duke3d

Download patch

ref: ede32c9248bd56240ec4b68220d9e95164504c8c
parent: 5238e4404d6251e3d1fde3774ea230393510e427
author: unknown <fabien@fabien-PC.(none)>
date: Sat Feb 9 07:57:42 EST 2013

Allocating 1MB of stack produced a stack overflow on windows and chkstk was very unhappy. The buffer is now statically allocated. Fixed windows build with strnicmp instead of strncasecmp.

--- a/Engine/src/filesystem.c
+++ b/Engine/src/filesystem.c
@@ -46,13 +46,13 @@
 static grpSet_t grpSet;
 
 
-
+uint8_t         crcBuffer[ 1 << 20]     ;
 int32_t initgroupfile(const char  *filename)
 {
 	uint8_t         buf[16]                 ;
 	int32_t         i, j, k                 ;
     grpArchive_t*   archive                 ;
-    uint8_t         crcBuffer[ 1 << 20]     ;
+    
     
     
 	printf("Loading %s ...\n", filename);
--- a/Engine/src/win32_compat.h
+++ b/Engine/src/win32_compat.h
@@ -92,6 +92,8 @@
 
 #define snprintf _snprintf
 
+#define strncasecmp strnicmp
+
 //Damn you Microsoft, how hard would it REALLY be to support C99 ?!??!?!
 #define inline 
 #include "windows/inttypes.h"