diff options
| author | onelin <oscar@nelin.dk> | 2025-03-22 22:09:01 +0000 |
|---|---|---|
| committer | onelin <oscar@nelin.dk> | 2025-03-22 22:09:01 +0000 |
| commit | 2897fb39cfe34e5f0ce0d5195d1bb027563f35d0 (patch) | |
| tree | 8b4466e689e51c104252757c274685b8ccb17f95 | |
| parent | 761aa1407dbf0ef1048ed7a394752f630f08c52f (diff) | |
Fix reallocing the wrong array
| -rw-r--r-- | src/rendering/src/rendering.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rendering/src/rendering.c b/src/rendering/src/rendering.c index 3b2f0a8..d373a7b 100644 --- a/src/rendering/src/rendering.c +++ b/src/rendering/src/rendering.c @@ -377,8 +377,8 @@ i32 renderbatch_add_ext(RenderBatch* renderbatch, RenderObject* obj, Transform* if ((1 + renderbatch->inst_count) * sizeof(BatchModelInstance) > renderbatch->inst_size) { // Realloc if necessary const usize sz = renderbatch->inst_size * 2; - renderbatch->models = realloc(renderbatch->instances, sz); - renderbatch->msize = sz; + renderbatch->instances = realloc(renderbatch->instances, sz); + renderbatch->inst_size = sz; } BatchModelInstance inst = { |
