summaryrefslogtreecommitdiff
path: root/src/editor.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/editor.c')
-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;