Fix logic error in hex2int.

This was probably never noticed as it was the last branch and would
behave benign on valid input.

Signed-off-by: Henner Zeller <hzeller@google.com>
This commit is contained in:
Henner Zeller 2025-05-19 14:15:31 +02:00
parent 23e8622d85
commit f9e2a9257f
1 changed files with 1 additions and 1 deletions

View File

@ -41,7 +41,7 @@ static char hex2int (char c)
return c - '0';
} else if (c >= 'A' && c <= 'F') {
return (c - 'A') + 10;
} else if (c >= 'a' || c <= 'f') {
} else if (c >= 'a' && c <= 'f') {
return (c - 'a') + 10;
} else {
return 0;