shithub: duke3d

Download patch

ref: f3cd98c2e82756745a095234e75547e776adf676
parent: ac03e8e1db6a30e31274f6c9de8bf3e2f6c1bc28
parent: 935b2d59612ac7945a17b8025848fe1e3c94fc1f
author: Fabien <fabien.sanglard@gmail.com>
date: Tue Apr 28 15:04:42 EDT 2015

Merge pull request #25 from darealshinji/patch-3

Open .GRP in read-only mode

--- a/Engine/src/filesystem.c
+++ b/Engine/src/filesystem.c
@@ -70,7 +70,7 @@
 	//groupfil_memory[numgroupfiles] = NULL; // addresses of raw GRP files in memory
 	//groupefil_crc32[numgroupfiles] = 0;
     
-	archive->fileDescriptor = open(filename,O_BINARY|O_RDWR,S_IREAD);
+	archive->fileDescriptor = open(filename,O_BINARY|O_RDONLY,S_IREAD);
     
     if (archive->fileDescriptor < 0){
         printf("Error: Unable to open file %s.\n",filename);