summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2025-01-30 03:21:59 +0500
committerilotterytea <iltsu@alright.party>2025-01-30 03:21:59 +0500
commit2ca545f754acc9c8a00b5ce8c0b3ca1175c74a3a (patch)
tree1f04b208bc59be230a766deea2ff4ade26271266 /src
parent0b9ffb82a7309ff7307846862165c2b8e60b3b3c (diff)
fix: temp fix for "access violation" exception
Diffstat (limited to 'src')
-rw-r--r--src/editor.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/editor.c b/src/editor.c
index 8193a52..d445ad3 100644
--- a/src/editor.c
+++ b/src/editor.c
@@ -54,7 +54,9 @@ void SE_UpdateEditor(Editor *editor) {
if (layers[selectedLayer] == NULL || selectedLayer >= cache->layerCount) {
cache->layerCount++;
- EditorTileLayer *layer = malloc(sizeof(EditorTileLayer));
+ // TODO: allocate memory based on active tiles.
+ // remove 1000 and you will get "access violation"
+ EditorTileLayer *layer = malloc(sizeof(EditorTileLayer) * 1000);
layer->index = selectedLayer;
layer->tilesCount = 0;