mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
Audit of error codes
This commit is contained in:
@ -138,16 +138,16 @@ int australia_post(struct zint_symbol *symbol, unsigned char source[], int lengt
|
||||
error_number = is_sane(NEON, source, length);
|
||||
break;
|
||||
default:
|
||||
strcpy(symbol->errtxt, "Auspost input is wrong length (D01)");
|
||||
strcpy(symbol->errtxt, "401: Auspost input is wrong length");
|
||||
return ZINT_ERROR_TOO_LONG;
|
||||
}
|
||||
if (error_number == ZINT_ERROR_INVALID_DATA) {
|
||||
strcpy(symbol->errtxt, "Invalid characters in data (D02)");
|
||||
strcpy(symbol->errtxt, "402: Invalid characters in data");
|
||||
return error_number;
|
||||
}
|
||||
} else {
|
||||
if (length > 8) {
|
||||
strcpy(symbol->errtxt, "Auspost input is too long (D03)");
|
||||
strcpy(symbol->errtxt, "403: Auspost input is too long");
|
||||
return ZINT_ERROR_TOO_LONG;
|
||||
}
|
||||
switch (symbol->symbology) {
|
||||
@ -169,7 +169,7 @@ int australia_post(struct zint_symbol *symbol, unsigned char source[], int lengt
|
||||
h = strlen(localstr);
|
||||
error_number = is_sane(GDSET, (unsigned char *) localstr, h);
|
||||
if (error_number == ZINT_ERROR_INVALID_DATA) {
|
||||
strcpy(symbol->errtxt, "Invalid characters in data (D04)");
|
||||
strcpy(symbol->errtxt, "404: Invalid characters in data");
|
||||
return error_number;
|
||||
}
|
||||
|
||||
@ -178,7 +178,7 @@ int australia_post(struct zint_symbol *symbol, unsigned char source[], int lengt
|
||||
dpid[8] = '\0';
|
||||
error_number = is_sane(NEON, (unsigned char *) dpid, strlen(dpid));
|
||||
if (error_number == ZINT_ERROR_INVALID_DATA) {
|
||||
strcpy(symbol->errtxt, "Invalid characters in DPID (D05)");
|
||||
strcpy(symbol->errtxt, "405: Invalid characters in DPID");
|
||||
return error_number;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user