mirror of
https://github.com/varun-r-mallya/Python-BPF.git
synced 2026-12-06 01:48:35 +00:00
Fix deref_to_depth loop type check to use cur_type
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user