mirror of
https://github.com/varun-r-mallya/Python-BPF.git
synced 2026-02-10 07:00:56 +00:00
Fix logical fallacy in get_char_array_ptr_and_size
This commit is contained in:
@ -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_ptr = local_sym_tab[var_name].var
|
||||||
var_type = local_sym_tab[var_name].ir_type
|
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)
|
var_type.pointee, ir.IntType(8)
|
||||||
):
|
):
|
||||||
raise ValueError("Expected str ptr variable")
|
raise ValueError("Expected str ptr variable")
|
||||||
|
|||||||
Reference in New Issue
Block a user