Skip to content

Commit f9494c8

Browse files
committed
Fix logical fallacy in get_char_array_ptr_and_size
1 parent 798f079 commit f9494c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pythonbpf/helper/helper_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ def get_char_array_ptr_and_size(buf_arg, builder, local_sym_tab, struct_sym_tab)
236236
var_ptr = local_sym_tab[var_name].var
237237
var_type = local_sym_tab[var_name].ir_type
238238

239-
if not isinstance(var_type, ir.PointerType) and not isinstance(
239+
if not isinstance(var_type, ir.PointerType) or not isinstance(
240240
var_type.pointee, ir.IntType(8)
241241
):
242242
raise ValueError("Expected str ptr variable")

0 commit comments

Comments
 (0)