diff --git a/Userland/Libraries/LibGfx/ImageFormats/PortableFormatWriter.cpp b/Userland/Libraries/LibGfx/ImageFormats/PortableFormatWriter.cpp index 018b2e45d1..81d78153d5 100644 --- a/Userland/Libraries/LibGfx/ImageFormats/PortableFormatWriter.cpp +++ b/Userland/Libraries/LibGfx/ImageFormats/PortableFormatWriter.cpp @@ -39,9 +39,9 @@ ErrorOr PortableFormatWriter::add_pixels(Stream& output, Options const& op for (int j = 0; j < bitmap.width(); ++j) { auto const color = bitmap.get_pixel(j, i); - row[j * 3 + 0] = color.red(); - row[j * 3 + 1] = color.green(); - row[j * 3 + 2] = color.blue(); + row.unchecked_at(j * 3 + 0) = color.red(); + row.unchecked_at(j * 3 + 1) = color.green(); + row.unchecked_at(j * 3 + 2) = color.blue(); } TRY(output.write_until_depleted(row.span()));