mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-12 22:25:59 -04:00
Audit of error codes
This commit is contained in:
parent
58e80a9ff7
commit
608b4b9134
38 changed files with 345 additions and 345 deletions
|
@ -616,7 +616,7 @@ int maxicode(struct zint_symbol *symbol, unsigned char local_source[], int lengt
|
|||
}
|
||||
|
||||
if ((mode < 2) || (mode > 6)) { /* Only codes 2 to 6 supported */
|
||||
strcpy(symbol->errtxt, "Invalid Maxicode Mode (E50)");
|
||||
strcpy(symbol->errtxt, "550: Invalid Maxicode Mode");
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
|
||||
|
@ -625,13 +625,13 @@ int maxicode(struct zint_symbol *symbol, unsigned char local_source[], int lengt
|
|||
lp = strlen(symbol->primary);
|
||||
}
|
||||
if (lp != 15) {
|
||||
strcpy(symbol->errtxt, "Invalid Primary String (E51)");
|
||||
strcpy(symbol->errtxt, "551: Invalid Primary String");
|
||||
return ZINT_ERROR_INVALID_DATA;
|
||||
}
|
||||
|
||||
for (i = 9; i < 15; i++) { /* check that country code and service are numeric */
|
||||
if ((symbol->primary[i] < '0') || (symbol->primary[i] > '9')) {
|
||||
strcpy(symbol->errtxt, "Invalid Primary String (E52)");
|
||||
strcpy(symbol->errtxt, "552: Invalid Primary String");
|
||||
return ZINT_ERROR_INVALID_DATA;
|
||||
}
|
||||
}
|
||||
|
@ -674,7 +674,7 @@ int maxicode(struct zint_symbol *symbol, unsigned char local_source[], int lengt
|
|||
|
||||
i = maxi_text_process(mode, local_source, length, symbol->eci);
|
||||
if (i == ZINT_ERROR_TOO_LONG) {
|
||||
strcpy(symbol->errtxt, "Input data too long (E53)");
|
||||
strcpy(symbol->errtxt, "553: Input data too long");
|
||||
return i;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue