From f9494c870bc5c4fcd277dd776a76d7bd8729416a Mon Sep 17 00:00:00 2001 From: Pragyansh Chaturvedi Date: Wed, 22 Oct 2025 04:01:45 +0530 Subject: [PATCH] Fix logical fallacy in get_char_array_ptr_and_size --- pythonbpf/helper/helper_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pythonbpf/helper/helper_utils.py b/pythonbpf/helper/helper_utils.py index 7f3fdbe..fdfd452 100644 --- a/pythonbpf/helper/helper_utils.py +++ b/pythonbpf/helper/helper_utils.py @@ -236,7 +236,7 @@ def get_char_array_ptr_and_size(buf_arg, builder, local_sym_tab, struct_sym_tab) var_ptr = local_sym_tab[var_name].var var_type = local_sym_tab[var_name].ir_type - if not isinstance(var_type, ir.PointerType) and not isinstance( + if not isinstance(var_type, ir.PointerType) or not isinstance( var_type.pointee, ir.IntType(8) ): raise ValueError("Expected str ptr variable")