From: Brendan Hansen Date: Wed, 3 Mar 2021 00:39:15 +0000 (-0600) Subject: should have tested this before I committed it X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=72869d391e580110162acc970ebbcbb0d4ddbbc3;p=onyx.git should have tested this before I committed it --- diff --git a/core/builtin.onyx b/core/builtin.onyx index a0733bab..b12356e4 100644 --- a/core/builtin.onyx +++ b/core/builtin.onyx @@ -26,9 +26,9 @@ vararg_get :: proc { }, (va: vararg, $T: type_expr, default: T = 0) -> T { - if va.count <= 0 do return false; + if va.count <= 0 do return default; ret := *cast(^T) va.data; - va.data = cast(rawptR) (cast(^u8) va.data + sizeof T); + va.data = cast(rawptr) (cast(^u8) va.data + sizeof T); va.count -= 1; return res; }