mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:17:44 +00:00
LibJS: Fix sign
data type in parse_temporal_time_zone_string()
A sign that's either the value 1 or -1 should obviously not have an unsigned data type :^) This would cause it to become 255 for the negative offset case, which would then completely screw up the offset_nanoseconds calculation as it serves as a multiplier.
This commit is contained in:
parent
709fe64c1b
commit
323e1e17cf
1 changed files with 1 additions and 1 deletions
|
@ -1638,7 +1638,7 @@ ThrowCompletionOr<TemporalTimeZone> parse_temporal_time_zone_string(GlobalObject
|
|||
// b. Set hours to ! ToIntegerOrInfinity(hours).
|
||||
u8 hours = *hours_part->to_uint<u8>();
|
||||
|
||||
u8 sign;
|
||||
i8 sign;
|
||||
// c. If sign is the code unit 0x002D (HYPHEN-MINUS) or the code unit 0x2212 (MINUS SIGN), then
|
||||
if (sign_part->is_one_of("-", "\u2212")) {
|
||||
// i. Set sign to −1.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue