mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-03-22 04:34:44 +00:00
Fix possible overflow when parsing floats without an integer
Fixes a WPT test, but I'm not exactly sure which one.
This commit is contained in:
@@ -583,7 +583,7 @@ fn consumeNumeric(self: *Tokenizer) Token {
|
||||
};
|
||||
|
||||
self.advance(2);
|
||||
} else if (self.hasAtLeast(1) and std.ascii.isDigit(self.byteAt(2))) {
|
||||
} else if (self.hasAtLeast(2) and std.ascii.isDigit(self.byteAt(2))) {
|
||||
self.advance(1);
|
||||
} else {
|
||||
break :blk;
|
||||
|
||||
@@ -154,3 +154,11 @@
|
||||
testing.expectEqual(true, typeof div.style.getPropertyPriority === 'function');
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<div id=crash1 style="background-position: 5% .1em"></div>
|
||||
<script id="crash_case_1">
|
||||
{
|
||||
testing.expectEqual('5% .1em', $('#crash1').style.backgroundPosition);
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user