LibPDF: Fix bad hex string parsing logic

This commit is contained in:
Matthew Olsson 2022-03-05 22:34:57 -07:00 committed by Andreas Kling
parent 3cfecc3d3b
commit 544e44eec1
Notes: sideshowbarker 2024-07-17 17:50:41 +09:00

View file

@ -847,8 +847,10 @@ String Parser::parse_hex_string()
hex_value *= 16;
if (ch <= '9') {
hex_value += ch - '0';
} else {
} else if (ch >= 'A' && ch <= 'F') {
hex_value += ch - 'A' + 10;
} else {
hex_value += ch - 'a' + 10;
}
}