aboutsummaryrefslogtreecommitdiff
path: root/types.c
diff options
context:
space:
mode:
Diffstat (limited to 'types.c')
-rw-r--r--types.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/types.c b/types.c
index 6a6f15ca..34ef4a33 100644
--- a/types.c
+++ b/types.c
@@ -486,7 +486,7 @@ type_t *get_field_type(type_t *t, const char *field_name)
auto e = Match(t, EnumType);
for (tag_t *tag = e->tags; tag; tag = tag->next) {
if (streq(field_name, tag->name))
- return tag->type;
+ return Type(PointerType, .pointed=tag->type, .is_optional=true, .is_readonly=true);
}
return NULL;
}