mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-14 15:14:49 -04: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
1 changed files with 3 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue