mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
Resolve bug when Maxicode mode set by user.
If you invoke the program with --mode=2 or --mode=3 zint reports the error "Invalid Primary String". Fixed by Travis Waalkens.
This commit is contained in:
parent
cc5e18211b
commit
533a5d0453
@ -602,6 +602,9 @@ int maxicode(struct zint_symbol *symbol, unsigned char source[], int length)
|
||||
}
|
||||
|
||||
if((mode == 2) || (mode == 3)) { /* Modes 2 and 3 need data in symbol->primary */
|
||||
if(lp == 0){ /* Mode set manually means lp doesn't get set */
|
||||
lp = strlen( symbol->primary );
|
||||
}
|
||||
if(lp != 15) {
|
||||
strcpy(symbol->errtxt, "Invalid Primary String");
|
||||
return ERROR_INVALID_DATA;
|
||||
|
Loading…
Reference in New Issue
Block a user