diff --git a/backend/maxicode.c b/backend/maxicode.c index 7f59afc0..a1909a84 100644 --- a/backend/maxicode.c +++ b/backend/maxicode.c @@ -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;