mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 23:58:50 +00:00
Correct offset_of_by_string
This commit is contained in:
@@ -749,8 +749,10 @@ bool check_builtin_procedure(CheckerContext *c, Operand *operand, Ast *call, i32
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (field_arg->tav.mode == Addressing_Constant && field_arg->tav.value.kind == ExactValue_String) {
|
Operand x = {};
|
||||||
field_name = field_arg->tav.value.value_string;
|
check_expr(c, &x, field_arg);
|
||||||
|
if (x.mode == Addressing_Constant && x.value.kind == ExactValue_String) {
|
||||||
|
field_name = x.value.value_string;
|
||||||
}
|
}
|
||||||
if (field_name.len == 0) {
|
if (field_name.len == 0) {
|
||||||
error(field_arg, "Expected a constant (non-empty) string for field argument");
|
error(field_arg, "Expected a constant (non-empty) string for field argument");
|
||||||
|
|||||||
Reference in New Issue
Block a user