Skip to content

Commit

Permalink
Merge pull request #81 from imaginoCDP/fix-code93
Browse files Browse the repository at this point in the history
fix(code93): Update encoder func to better handle checksum
  • Loading branch information
boombuler committed Jul 3, 2024
2 parents 65580ac + d6f8bd4 commit 83789df
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion code93/encoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ func Encode(content string, includeChecksum bool, fullASCIIMode bool) (barcode.B
}

data := content + string(getChecksum(content, 20))
data += string(getChecksum(data, 15))
if includeChecksum {
data += string(getChecksum(data, 15))
}

data = "*" + data + "*"
result := new(utils.BitList)
Expand Down

0 comments on commit 83789df

Please sign in to comment.