1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 13:27:35 +00:00

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

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;
}
}