shithub: choc

Download patch

ref: 47091d24fbe24e4ccbb10df225e61316d9c229ea
parent: 746f429371aa0d6e03a62d6c00e97ccbffd5acea
author: Turo Lamminen <turotl@gmail.com>
date: Fri Mar 2 18:57:56 EST 2018

Make M_StrCaseStr parameters and return value const

--- a/src/m_misc.c
+++ b/src/m_misc.c
@@ -343,7 +343,7 @@
 // Case-insensitive version of strstr()
 //
 
-char *M_StrCaseStr(char *haystack, char *needle)
+const char *M_StrCaseStr(const char *haystack, const char *needle)
 {
     unsigned int haystack_len;
     unsigned int needle_len;
--- a/src/m_misc.h
+++ b/src/m_misc.h
@@ -36,7 +36,7 @@
 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);
+const char *M_StrCaseStr(const char *haystack, const char *needle);
 char *M_StringDuplicate(const char *orig);
 boolean M_StringCopy(char *dest, const char *src, size_t dest_size);
 boolean M_StringConcat(char *dest, const char *src, size_t dest_size);