diff options
Diffstat (limited to 'lib9p/protogen/c_validate.py')
-rw-r--r-- | lib9p/protogen/c_validate.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib9p/protogen/c_validate.py b/lib9p/protogen/c_validate.py index 7d0c69e..535a750 100644 --- a/lib9p/protogen/c_validate.py +++ b/lib9p/protogen/c_validate.py @@ -24,11 +24,11 @@ def should_save_offset(parent: idl.Struct, child: idl.StructMember) -> bool: for sibling in parent.members: if sibling.val: for tok in sibling.val.tokens: - if isinstance(tok, idl.ExprSym) and tok.symname == f"&{child.membname}": + if isinstance(tok, idl.ExprOff) and tok.membname == child.membname: return True if sibling.max: for tok in sibling.max.tokens: - if isinstance(tok, idl.ExprSym) and tok.symname == f"&{child.membname}": + if isinstance(tok, idl.ExprOff) and tok.membname == child.membname: return True return False |