yeahdongcn / RSBarcodes_Swift

1D and 2D barcodes reader and generators for iOS 8 with delightful controls. Now Swift.
MIT License
710 stars 185 forks source link

Fix zero remainder bug in UPCE Generator #55

Closed matthewellis closed 8 years ago

matthewellis commented 8 years ago

The check digit method in the UPCE Generator incorrectly returned 10 when it should have been returning 0 for the data "0000000"

I make changes to return 0 when the remainder is 0 according to the this page http://www.morovia.com/education/utility/upc-ean.asp