shithub: tinygl

Download patch

ref: 56185b12abb42c178037d10245526e812597ab6d
parent: 49c8e2c75b571e0c69bc5d59e977f6f4c70c5edb
author: MHS <gek@katherine>
date: Fri Apr 9 21:15:42 EDT 2021

Automatic commit.

--- a/include-demo/stringutil.h
+++ b/include-demo/stringutil.h
@@ -26,15 +26,6 @@
 #define strcatafb strcatallocfb
 #endif
 
-#ifndef loop
-//Loop without errors!
-#define loop(v, e)\
-for(unsigned long long v = 0, __internal_##v = 0; __internal_##v < e; __internal_##v++, v = __internal_##v)
-
-#define loople(v, e)\
-for(unsigned long long v = 0, __internal_##v = 0; __internal_##v <= e; __internal_##v++, v = __internal_##v)
-
-#endif
 //Strcat but with malloc.
 static inline char* strcatalloc(const char* s1, const char* s2){
 	char* d = NULL; d = STRUTIL_ALLOC(strlen(s1) + strlen(s2) + 1);
@@ -109,9 +100,9 @@
 			if(subtext[si] == '\0') return (ti - st)+1;
 		}else {
 			si = 0;
+			if(text[ti] == subtext[si])si++; //Minor case.
 			if(subtext[si] == '\0') return (ti - st);
 		}
-		
 	}
 	return -1;
 }