diff options
author | Haru <haru@dotalux.com> | 2019-05-09 02:10:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-09 02:10:50 +0200 |
commit | 3a1cd6616938f4c325f3cb73842e84c364ab8738 (patch) | |
tree | b1a3db8cc8a2a127f54d8c9cfd2e1e7b9118c0c3 | |
parent | 280346a0a902f13682c311bd3137280ebbee9a0e (diff) | |
parent | 7cda78aeb3ed3aab4986b6032c43104cd580e62a (diff) | |
download | hercules-3a1cd6616938f4c325f3cb73842e84c364ab8738.tar.gz hercules-3a1cd6616938f4c325f3cb73842e84c364ab8738.tar.bz2 hercules-3a1cd6616938f4c325f3cb73842e84c364ab8738.tar.xz hercules-3a1cd6616938f4c325f3cb73842e84c364ab8738.zip |
Merge pull request #2467 from MishimaHaruna/fix-hpmhooksgen
Fix errors in the HPM Hooks Generator
-rwxr-xr-x | tools/HPMHookGen/HPMHookGen.pl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/HPMHookGen/HPMHookGen.pl b/tools/HPMHookGen/HPMHookGen.pl index e5a5c1914..46cae36cb 100755 --- a/tools/HPMHookGen/HPMHookGen.pl +++ b/tools/HPMHookGen/HPMHookGen.pl @@ -371,7 +371,8 @@ foreach my $file (@files) { # Loop through the xml files $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 |