changeset 62:924720517cf9

Fix initialization of hash structure part, this fixes resetting of class hits to 1.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 17 Aug 2009 08:41:10 +0300
parents 8b33436dd18b
children 6917de5b91be
files maltfilter
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/maltfilter	Mon Aug 17 08:22:38 2009 +0300
+++ b/maltfilter	Mon Aug 17 08:41:10 2009 +0300
@@ -754,8 +754,8 @@
 
   $struct->{$mip} = {} unless defined($struct->{$mip});
   my $entry = $struct->{$mip};
-  $struct->{$mip}{"reason"}{$mclass} = {};
-  my $reason = $struct->{$mip}{"reason"}{$mclass};
+  $entry->{"reason"}{$mclass} = {} unless defined($entry->{"reason"}{$mclass});
+  my $reason = $entry->{"reason"}{$mclass};
 
   # Add hits only when requested  
   if ($addhits) {