From 17bb4d7343e5ebe05f7a059b62eeb22e84bcd758 Mon Sep 17 00:00:00 2001 From: tonnesen Date: Wed, 3 Jul 2002 03:18:50 +0000 Subject: [PATCH] Fixed bug in checkvalidisbn() --- C4/Input.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Input.pm b/C4/Input.pm index 153e282ac4..aa908a953f 100644 --- a/C4/Input.pm +++ b/C4/Input.pm @@ -74,7 +74,7 @@ sub checkvalidisbn { my $digit=substr($q,$i,1); $c+=$digit*(10-$i); } - $c=int(11-($c/11-int($c/11))*11+.1); + $c=$c%11; # % is the modulus function ($c==10) && ($c='X'); if ($c eq $checksum) { $isbngood=1; -- 2.39.5