diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..8b1f745 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + "recommendations": [ + "gruntfuggly.todo-tree" + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..48e4c56 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,67 @@ +{ + "todo-tree.filtering.includeGlobs": [ + "**/repl/**", + "**/scripts/**", + "**/source/**", + "**/tests/**", + "**/tools/**", + ], + "todo-tree.filtering.excludeGlobs": [ + "**/obj/**", + "**/out/**", + "**/Toy/**", + ], + "todo-tree.general.tags": [ + "URGENT", + "BUG", + "TODO", + "WARN", + "BUGFIX", + "WONTFIX", + "NOTE" + ], + "todo-tree.highlights.customHighlight": { + "URGENT": { + "icon": "alert", + "type": "text", + "iconColour": "#FF0000", + "foreground": "#FF0000" + }, + "BUG": { + "icon": "bug", + "type": "text", + "iconColour": "#FF0000", + "foreground": "#FF0000" + }, + "TODO": { + "icon": "alert", + "type": "text", + "iconColour": "#FFFF00", + "foreground": "#FFFF00" + }, + "WARN": { + "icon": "alert", + "type": "text", + "iconColour": "#FFA500", + "foreground": "#FFA500" + }, + "BUGFIX": { + "icon": "bug", + "type": "text", + "iconColour": "#00A000", + "foreground": "#00A000" + }, + "WONTFIX": { + "icon": "bug", + "type": "text", + "iconColour": "#B64949", + "foreground": "#B64949" + }, + "NOTE": { + "icon": "alert", + "type": "text", + "iconColour": "#00A000", + "foreground": "#00A000" + }, + } +} \ No newline at end of file diff --git a/Toy b/Toy index 18a4b33..7cdb81e 160000 --- a/Toy +++ b/Toy @@ -1 +1 @@ -Subproject commit 18a4b33c4e6a79c49ec1c2d94d56cf2c52c76e9a +Subproject commit 7cdb81e0bfa846cb32ccf1935ab196628c9e25ed diff --git a/source/main.c b/source/main.c index 6983616..8ed2f27 100644 --- a/source/main.c +++ b/source/main.c @@ -37,6 +37,7 @@ unsigned char* readFile(char* path, int* size) { //read the file if (fread(buffer, sizeof(unsigned char), *size, file) < (unsigned int)(*size)) { fclose(file); + free(buffer); *size = -2; //singal a read error return NULL; }