Fixed logic bug in checkvalidisbn routine

This commit is contained in:
tonnesen 2002-07-05 04:45:13 +00:00
parent f8b9603a81
commit e90baa1c72
1 changed files with 1 additions and 1 deletions

View File

@ -72,7 +72,7 @@ sub checkvalidisbn {
my $c=0;
for ($i=0; $i<9; $i++) {
my $digit=substr($q,$i,1);
$c+=$digit*(10-$i);
$c+=$digit*($i+1);
}
$c=$c%11; # % is the modulus function
($c==10) && ($c='X');