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:
InvalidUsernameException 2025-04-19 17:26:58 +02:00 committed by Jelle Raaijmakers
commit 84ff18b6ac
Notes: github-actions[bot] 2025-04-23 07:31:10 +00:00

View file

@ -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);