From 115d51c40223b9e787b4c81a8c217ffeb5779830 Mon Sep 17 00:00:00 2001 From: Ronald Brachetti Date: Thu, 12 Oct 2023 00:40:18 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20concatenation=20bug=20=F0=9F=90=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + src/memory.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 3194491..879169e 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ target/** .cache/** test.lox test*.lox +.idea/** \ No newline at end of file diff --git a/src/memory.h b/src/memory.h index 151ce50..aa3d0a8 100644 --- a/src/memory.h +++ b/src/memory.h @@ -4,7 +4,7 @@ #include "common.h" #include "object.h" -#define ALLOCATE(type, count) (type*)reallocate(NULL, 0, sizeof(true) * (count)) +#define ALLOCATE(type, count) (type*)reallocate(NULL, 0, sizeof(type) * (count)) #define GROW_CAPACITY(capacity) ((capacity) < 8 ? 8 : (capacity) * 2)