From 0482aa2be9d7f30c83728aeb0b014f9e4bc90b90 Mon Sep 17 00:00:00 2001 From: Pragyansh Chaturvedi Date: Sun, 31 May 2026 15:31:43 +0530 Subject: [PATCH] Fix deref_to_depth loop type check to use cur_type Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- pythonbpf/expr/ir_ops.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pythonbpf/expr/ir_ops.py b/pythonbpf/expr/ir_ops.py index df6f503..3f10d19 100644 --- a/pythonbpf/expr/ir_ops.py +++ b/pythonbpf/expr/ir_ops.py @@ -11,7 +11,7 @@ def deref_to_depth(func, builder, val, target_depth): cur_type = val.type for depth in range(target_depth): - if not isinstance(val.type, ir.PointerType): + if not isinstance(cur_type, ir.PointerType): logger.error("Cannot dereference further, non-pointer type") return None