Skip to content

Commit

Permalink
add bindings and fix NULL condition
Browse files Browse the repository at this point in the history
  • Loading branch information
jpohls1 committed Nov 27, 2023
1 parent 2243306 commit a5c14b1
Show file tree
Hide file tree
Showing 6 changed files with 6,392 additions and 5,916 deletions.
2 changes: 1 addition & 1 deletion src/internals/rules.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ impl<'a> Iterator for RuleIterator<'a> {
let rule = unsafe { *self.head };
let mut result: Option<Self::Item> = None;

if rule.flags & rule.flags == yara_sys::RULE_FLAGS_NULL {
if (rule.flags & yara_sys::RULE_FLAGS_NULL) != 0 {
self.head = std::ptr::null();
} else {
let rule_data = Rule::from(unsafe { &*self.head });
Expand Down
Loading

0 comments on commit a5c14b1

Please sign in to comment.