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)