mirror of
https://gittea.dev/nova/th.git
synced 2025-10-25 20:24:33 -04:00
removal of all strcpy
This commit is contained in:
@@ -24,7 +24,7 @@ char* smartstrcasestr(char *haystack, const char *needle){
|
||||
needle -= passes;
|
||||
if (smart == 0) {
|
||||
char *needle_case = malloc(strlen(needle)+1);
|
||||
strcpy(needle_case, needle);
|
||||
memcpy(needle_case, needle, strlen(needle));
|
||||
passes = 0;
|
||||
while (*needle_case) {
|
||||
*needle_case = *needle_case | ' ';
|
||||
@@ -34,7 +34,7 @@ char* smartstrcasestr(char *haystack, const char *needle){
|
||||
needle_case -= passes;
|
||||
|
||||
char *haystack_case = malloc(strlen(haystack)+1);
|
||||
strcpy(haystack_case, haystack);
|
||||
memcpy(haystack_case, haystack, strlen(haystack));
|
||||
passes = 0;
|
||||
while (*haystack_case) {
|
||||
*haystack_case = *haystack_case | ' ';
|
||||
|
||||
Reference in New Issue
Block a user