summaryrefslogtreecommitdiff
path: root/copy.c
diff options
context:
space:
mode:
Diffstat (limited to 'copy.c')
-rw-r--r--copy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/copy.c b/copy.c
index 12610e6..178a1d2 100644
--- a/copy.c
+++ b/copy.c
@@ -46,7 +46,7 @@ static void copy_val(Allocator *a, Value *out, Value *in, Type *t) {
*out = *in;
break;
case TYPE_ARR: {
- size_t bytes = t->arr.n * compiler_sizeof(t->arr.of);
+ size_t bytes = (size_t)t->arr.n * compiler_sizeof(t->arr.of);
out->arr = allocr_malloc(a, bytes);
memcpy(out->arr, in->arr, bytes);
} break;