mirror of
https://git.code.sf.net/p/zint/code
synced 2025-12-18 02:17:06 +00:00
Move escape character processing into library
And expand to include all 8-bit values.
This commit is contained in:
@@ -43,7 +43,11 @@ size_t ustrlen(const unsigned char data[]) {
|
||||
int ctoi(const char source) {
|
||||
if ((source >= '0') && (source <= '9'))
|
||||
return (source - '0');
|
||||
return (source - 'A' + 10);
|
||||
if ((source >= 'A') && (source <= 'F'))
|
||||
return (source - 'A' + 10);
|
||||
if ((source >= 'a') && (source <= 'f'))
|
||||
return (source - 'a' + 10);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user