summaryrefslogtreecommitdiff
path: root/types.c
diff options
context:
space:
mode:
Diffstat (limited to 'types.c')
-rw-r--r--types.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/types.c b/types.c
index 1001e07..7dbfff6 100644
--- a/types.c
+++ b/types.c
@@ -264,7 +264,7 @@ static size_t compiler_sizeof(Type *t) {
case TYPE_PTR:
return sizeof v.ptr;
case TYPE_ARR:
- return t->arr.n * compiler_sizeof(t->arr.of);
+ return (size_t)t->arr.n * compiler_sizeof(t->arr.of);
case TYPE_TUPLE:
return sizeof v.tuple;
case TYPE_SLICE: