mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-22 17:24:48 -05:00
parent
be693e95ff
commit
ad8284bac6
Notes:
sideshowbarker
2024-07-19 02:01:38 +09:00
Author: https://github.com/tuckerpo 🔰 Commit: https://github.com/SerenityOS/serenity/commit/ad8284bac68 Pull-request: https://github.com/SerenityOS/serenity/pull/3687 Reviewed-by: https://github.com/awesomekling
1 changed files with 4 additions and 1 deletions
|
@ -212,7 +212,10 @@ Optional<JsonValue> JsonParser::parse_number()
|
|||
whole = number.value();
|
||||
}
|
||||
|
||||
int fraction = fraction_string.to_uint().value();
|
||||
auto fraction_string_uint = fraction_string.to_uint();
|
||||
if (!fraction_string_uint.has_value())
|
||||
return {};
|
||||
int fraction = fraction_string_uint.value();
|
||||
fraction *= (whole < 0) ? -1 : 1;
|
||||
|
||||
auto divider = 1;
|
||||
|
|
Loading…
Reference in a new issue