Correct warning if used -Wextra

This commit is contained in:
german 2026-05-03 19:48:25 +04:00
parent f150e9ae06
commit 3b8246dd44

View File

@ -143,7 +143,7 @@ static unsigned char __compile_and_equals_sflag(char* flags, char* str) {
return 0; return 0;
} }
static void* malloc_str(char* str) { static char* malloc_str(char* str) {
char* ptr = malloc((strlen(str)) * sizeof(char) + sizeof(char)); char* ptr = malloc((strlen(str)) * sizeof(char) + sizeof(char));
strcpy(ptr, str); strcpy(ptr, str);
return ptr; return ptr;