aboutsummaryrefslogtreecommitdiff
path: root/src/check_builtin.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2022-08-24 12:18:42 +0100
committergingerBill <bill@gingerbill.org>2022-08-24 12:18:42 +0100
commit2908923db9d047185de110991cc3347a112c38a6 (patch)
tree0f8d56dc8bd8956a0793c0ea64d92dc50d661315 /src/check_builtin.cpp
parent8c1dfabb6beedbc4d93bb7030ac724446c82b93c (diff)
Fix #1972
Diffstat (limited to 'src/check_builtin.cpp')
-rw-r--r--src/check_builtin.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/check_builtin.cpp b/src/check_builtin.cpp
index 83136d576..e55a2e024 100644
--- a/src/check_builtin.cpp
+++ b/src/check_builtin.cpp
@@ -4523,7 +4523,8 @@ bool check_builtin_procedure(CheckerContext *c, Operand *operand, Ast *call, i32
if (x.mode != Addressing_Invalid) {
convert_to_typed(c, &x, t_uintptr);
}
- if (!is_type_uintptr(operand->type)) {
+ convert_to_typed(c, &x, t_uintptr);
+ if (!is_type_uintptr(x.type)) {
gbString t = type_to_string(x.type);
error(x.expr, "Argument %td must be of type 'uintptr', got %s", i, t);
gb_string_free(t);