projects
/
koha.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d6f9a61
)
Fixed bug in checkvalidisbn()
author
tonnesen
<tonnesen>
Wed, 3 Jul 2002 03:18:50 +0000
(
03:18
+0000)
committer
tonnesen
<tonnesen>
Wed, 3 Jul 2002 03:18:50 +0000
(
03:18
+0000)
C4/Input.pm
patch
|
blob
|
history
diff --git
a/C4/Input.pm
b/C4/Input.pm
index
153e282
..
aa908a9
100644
(file)
--- 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;