diff options
| author | ilotterytea <iltsu@alright.party> | 2025-01-30 03:21:59 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-01-30 03:21:59 +0500 |
| commit | 2ca545f754acc9c8a00b5ce8c0b3ca1175c74a3a (patch) | |
| tree | 1f04b208bc59be230a766deea2ff4ade26271266 | |
| parent | 0b9ffb82a7309ff7307846862165c2b8e60b3b3c (diff) | |
fix: temp fix for "access violation" exception
| -rw-r--r-- | src/editor.c | 4 |
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; |
