mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 12:49:19 +00:00
LibGfx: Assert on out-of-bounds y-value
The reduced amount of indirections from the previous commit made it obvious that a range check on the y-value was missing.
This commit is contained in:
parent
7568ea3160
commit
84ff18b6ac
Notes:
github-actions[bot]
2025-04-23 07:31:10 +00:00
Author: https://github.com/InvalidUsernameException
Commit: 84ff18b6ac
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4404
Reviewed-by: https://github.com/gmta ✅
1 changed files with 1 additions and 1 deletions
|
@ -231,7 +231,7 @@ ALWAYS_INLINE Color Bitmap::get_pixel(int x, int y) const
|
|||
{
|
||||
VERIFY(x >= 0);
|
||||
VERIFY(x < width());
|
||||
auto pixel = unchecked_scanline(y)[x];
|
||||
auto pixel = scanline(y)[x];
|
||||
switch (determine_storage_format(m_format)) {
|
||||
case StorageFormat::BGRx8888:
|
||||
return Color::from_rgb(pixel);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue