use stb like a normal person (totally didnt waste an hour)

This commit is contained in:
2023-12-21 19:42:50 +01:00
parent 44a4374fd1
commit 71e935c8ad
4 changed files with 1939 additions and 38 deletions

View File

@@ -12,7 +12,7 @@ void todo_free_item(TodoItem *item) {
TodoItem todo_create_item(char *title) {
TodoItem item;
item.title_length = strlen(title);
item.title = malloc(item.title_length);
item.title = malloc(item.title_length + 1);
strcpy(item.title, title);
item.completed = false;