diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-10-01 15:04:06 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-10-01 15:04:06 +1300 |
commit | c2ecf80df96f9782ef716d01678ed33f886a6480 (patch) | |
tree | fd3debdb195edd49e91072e668371254ff145ff6 /src/org/traccar/helper/Crc.java | |
parent | e84f02c3bffda311e86fab584d7c40702b5223be (diff) | |
download | traccar-server-c2ecf80df96f9782ef716d01678ed33f886a6480.tar.gz traccar-server-c2ecf80df96f9782ef716d01678ed33f886a6480.tar.bz2 traccar-server-c2ecf80df96f9782ef716d01678ed33f886a6480.zip |
Fix Luhn checksum calculation
Diffstat (limited to 'src/org/traccar/helper/Crc.java')
-rw-r--r-- | src/org/traccar/helper/Crc.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/org/traccar/helper/Crc.java b/src/org/traccar/helper/Crc.java index 418ec3132..522a25403 100644 --- a/src/org/traccar/helper/Crc.java +++ b/src/org/traccar/helper/Crc.java @@ -172,7 +172,7 @@ public class Crc { remain /= 10; } - return 10 - (checksum % 10); + return (10 - (checksum % 10)) % 10; } } |