Fix segfault (closes #434, #435)

This commit is contained in:
AnErrupTion 2022-12-07 12:20:23 +01:00
parent 2ffb86213b
commit 19153760d3

View File

@ -196,9 +196,7 @@ void input_desktop_add(
target->list[target->cur] = name;
int name_len = strlen(name);
char* name_simple = malloc(name_len);
memcpy(name_simple, name, name_len);
char* name_simple = strdup(name_len);
if (strstr(name_simple, " ") != NULL)
{