shithub: tinygl

Download patch

ref: 9e1ce3eb2aa64369587f9cf840c7ebe21950bde3
parent: 9259fccc33f5a2dcf0df4344716de74e32d51926
author: David <gek@katherine>
date: Tue Mar 9 12:57:51 EST 2021

Automatic commit.

--- a/SDL_Examples/include/stringutil.h
+++ b/SDL_Examples/include/stringutil.h
@@ -33,12 +33,13 @@
 }
 //Free the first argument.
 static inline char* strcatallocf1(char* s1, const char* s2){
-	char* d = NULL; d = STRUTIL_ALLOC(strlen(s1) + strlen(s2) + 1);
+	char* d = STRUTIL_REALLOC(s1, strlen(s1) + strlen(s2) + 1);
+	//char* d = NULL; d = STRUTIL_ALLOC(strlen(s1) + strlen(s2) + 1);
 	if(d){
-		strcpy(d, s1);
+		//strcpy(d, s1);
 		strcat(d, s2);
 	}
-	STRUTIL_FREE(s1);
+	//STRUTIL_FREE(s1);
 	return d;
 }
 //Free the second argument.