Skip to content

Commit

Permalink
Moving over change from CVS repository. Fix case where frame is ill f…
Browse files Browse the repository at this point in the history
…ormed.
  • Loading branch information
David Molnar committed Jul 10, 2009
1 parent d4f7f13 commit 5ba6711
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion catchconv/tests/libstackhash.pl
Expand Up @@ -34,10 +34,16 @@ sub fuzzystackhash
}
$curframe = 0;
$fuzzystring = "";

$numframes = eval{@$frame};
if (! defined $numframes)
{
$numframes = 0;
}

#Depends on perl returning empty string when referencing $curframe
#that does not exist.
while ($curframe < 3 && ($curframe < @$frame))
while ($curframe < 3 && $numframes)
{
$frameobj = $frame->[$curframe];
$fuzzystring = $fuzzystring . $frameobj->{'fn'};
Expand Down

0 comments on commit 5ba6711

Please sign in to comment.