1
0
Fork 0
mirror of https://git.code.sf.net/p/zint/code synced 2025-05-29 14:25:23 -04:00

Resolve Visual Studio compatability bugs

Includes bugfix for Item ID calculation in Mailmark as reported by Milton Neal
This commit is contained in:
Robin Stuart 2018-04-09 21:46:20 +01:00
parent 3853897d88
commit e749872e7d
2 changed files with 7 additions and 5 deletions
backend

View file

@ -593,7 +593,7 @@ int channel_code(struct zint_symbol *symbol, unsigned char source[], int length)
/* Vehicle Identification Number (VIN) */
int vin(struct zint_symbol *symbol, unsigned char source[], int length) {
int vin(struct zint_symbol *symbol, const unsigned char source[], const size_t in_length) {
/* This code verifies the check digit present in North American VIN codes */
@ -606,6 +606,7 @@ int vin(struct zint_symbol *symbol, unsigned char source[], int length) {
int weight[17] = {8, 7, 6, 5, 4, 3, 2, 10, 0, 9, 8, 7, 6, 5, 4, 3, 2};
int sum;
int i;
int length = (int) in_length;
// Check length
if (length > 17) {