mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 12:20:00 +01: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
|
|
@ -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…
Reference in New Issue
Block a user