mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 17:40:27 +00:00
LibPDF: Fix bad hex string parsing logic
This commit is contained in:
parent
3cfecc3d3b
commit
544e44eec1
Notes:
sideshowbarker
2024-07-17 17:50:41 +09:00
Author: https://github.com/mattco98 Commit: https://github.com/SerenityOS/serenity/commit/544e44eec1 Pull-request: https://github.com/SerenityOS/serenity/pull/12920
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue