mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 07:08:48 +00:00
Fix printing error when field name could not be found
This commit is contained in:
+2
-1
@@ -4595,7 +4595,8 @@ gb_internal ExactValue get_constant_field_single(CheckerContext *c, ExactValue v
|
|||||||
String name = fv->field->Ident.token.string;
|
String name = fv->field->Ident.token.string;
|
||||||
Selection sub_sel = lookup_field(node->tav.type, name, false);
|
Selection sub_sel = lookup_field(node->tav.type, name, false);
|
||||||
defer (array_free(&sub_sel.index));
|
defer (array_free(&sub_sel.index));
|
||||||
if (sub_sel.index[0] == index) {
|
if (sub_sel.index.count > 0 &&
|
||||||
|
sub_sel.index[0] == index) {
|
||||||
value = fv->value->tav.value;
|
value = fv->value->tav.value;
|
||||||
found = true;
|
found = true;
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user