Skip to content

Commit c2adedb

Browse files
dada2048pphaneuf
authored andcommittedApr 29, 2011
Fixed infinite loop caused by very old demo formats.
git-svn-id: http://quadra.googlecode.com/svn/trunk/quadra@455 8926ee93-8b47-0410-9975-e57e0fb0bd0c
1 parent 670972a commit c2adedb

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed
 

‎stats/RecReader.pm

+5-4
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@ sub _parse {
5656
my ($name, $score, $lines, $level) = unpack "Z40VVV", substr $hunks, $pos+1, 52;
5757
$pos += 53;
5858
}
59-
60-
if($hunktype == 11) {
59+
elsif($hunktype == 11) {
6160
my ($frame, $len) = unpack "Vv", substr $hunks, $pos+1, 6;
6261
my $packet = substr $hunks, $pos+7, $len;
6362
my $packetid = unpack "C", $packet;
@@ -81,12 +80,14 @@ sub _parse {
8180
}
8281
$pos += (7 + $len);
8382
}
84-
85-
if($hunktype == 13) {
83+
elsif($hunktype == 13) {
8684
my $len = unpack "V", substr $hunks, $pos+1, 4;
8785
$summary = substr $hunks, $pos+5, $len;
8886
$pos += (5 + $len);
8987
}
88+
else {
89+
last;
90+
}
9091
}
9192
return $summary;
9293
}

0 commit comments

Comments
 (0)
Please sign in to comment.