Skip to content

Commit 0482aa2

Browse files
r41k0uCopilot
andcommitted
Fix deref_to_depth loop type check to use cur_type
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent d4f1b5a commit 0482aa2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pythonbpf/expr/ir_ops.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def deref_to_depth(func, builder, val, target_depth):
1111
cur_type = val.type
1212

1313
for depth in range(target_depth):
14-
if not isinstance(val.type, ir.PointerType):
14+
if not isinstance(cur_type, ir.PointerType):
1515
logger.error("Cannot dereference further, non-pointer type")
1616
return None
1717

0 commit comments

Comments
 (0)