Merge pull request #81 from imaginoCDP/fix-code93

fix(code93): Update encoder func to better handle checksum
This commit is contained in:
Florian 2024-07-03 04:53:26 +02:00 committed by GitHub
commit 83789dfea1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -88,7 +88,9 @@ func Encode(content string, includeChecksum bool, fullASCIIMode bool) (barcode.B
}
data := content + string(getChecksum(content, 20))
if includeChecksum {
data += string(getChecksum(data, 15))
}
data = "*" + data + "*"
result := new(utils.BitList)