shithub: choc

Download patch

ref: 746f429371aa0d6e03a62d6c00e97ccbffd5acea
parent: 95fef9ea786a52bfa07e94fdaae22c6d0e3f30c8
author: Turo Lamminen <[email protected]>
date: Fri Mar 2 18:50:32 EST 2018

Make M_ExtractFileBase path parameter const

--- a/src/m_misc.c
+++ b/src/m_misc.c
@@ -264,10 +264,10 @@
         || sscanf(str, " %d", result) == 1;
 }
 
-void M_ExtractFileBase(char *path, char *dest)
+void M_ExtractFileBase(const char *path, char *dest)
 {
-    char *src;
-    char *filename;
+    const char *src;
+    const char *filename;
     int length;
 
     src = path + strlen(path) - 1;
--- a/src/m_misc.h
+++ b/src/m_misc.h
@@ -33,7 +33,7 @@
 char *M_FileCaseExists(const char *file);
 long M_FileLength(FILE *handle);
 boolean M_StrToInt(const char *str, int *result);
-void M_ExtractFileBase(char *path, char *dest);
+void M_ExtractFileBase(const char *path, char *dest);
 void M_ForceUppercase(char *text);
 void M_ForceLowercase(char *text);
 char *M_StrCaseStr(char *haystack, char *needle);