Skip to content
Permalink
Browse files

Merge pull request #2467 from MishimaHaruna/fix-hpmhooksgen

Fix errors in the HPM Hooks Generator
  • Loading branch information...
MishimaHaruna committed May 9, 2019
2 parents 280346a + 7cda78a commit 3a1cd6616938f4c325f3cb73842e84c364ab8738
Showing with 2 additions and 1 deletion.
  1. +2 −1 tools/HPMHookGen/HPMHookGen.pl
@@ -371,7 +371,8 @@ ($$)
$t = ')(int fd, struct login_session_data *sd)'; # typedef LoginParseFunc
$def =~ s/^LoginParseFunc\s*\*\s*(.*)$/enum parsefunc_rcode(* $1) (int fd, struct login_session_data *sd)/;
}
next unless ref $t ne 'HASH' and $t =~ /^[^\[]/; # If it's not a string, or if it starts with an array subscript, we can skip it
next if ref $t eq 'HASH'; # Skip if it's not a string
next if $t =~ /^\)?\[.*\]$/; # Skip arrays or pointers to array

my $if = parse($t, $def);
next unless scalar keys %$if; # If it returns an empty hash reference, an error must've occurred

0 comments on commit 3a1cd66

Please sign in to comment.
You can’t perform that action at this time.