Skip to content

Commit

Permalink
fix off-by-one in error reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
mohawk2 committed Sep 29, 2021
1 parent ccb2f6c commit 95bc014
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/perl/fbench.pl
Original file line number Diff line number Diff line change
Expand Up @@ -307,9 +307,9 @@ sub transit_surface {
printf("\nError in results on line %d...\n", $i + 1);
print("Expected: $refarr[$i]\n");
print("Received: $outarr[$i]\n");
print("(Errors) ");
print("(Errors) ");
my $k = length($refarr[$i]);
for (my $j = 0; $j < $k; $j++) {
for my $j (0..$k-1) {
print(substr($refarr[$i], $j, 1) eq substr($outarr[$i], $j, 1) ? ' ' : '^');
if (substr($refarr[$i], $j, 1) ne substr($outarr[$i], $j, 1)) {
$errors++;
Expand Down

0 comments on commit 95bc014

Please sign in to comment.