2
0
Эх сурвалжийг харах

Allow for empty replacement string (#1178)

Benjamin Stigsen 5 жил өмнө
parent
commit
2d6303e9fe
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  1. 1 1
      src/text.c

+ 1 - 1
src/text.c

@@ -1180,7 +1180,7 @@ const char *TextSubtext(const char *text, int position, int length)
 char *TextReplace(char *text, const char *replace, const char *by)
 {
     // Sanity checks and initialization
-    if (!text || !replace || !by || by[0] == '\0') return NULL;
+    if (!text || !replace || !by) return NULL;
     
     char *result;