Skip to content

Commit a299619

Browse files
committed
yes
1 parent ad27df2 commit a299619

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

runtime/Sources/Renderer/Image.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,9 @@ namespace mlx
243243
if(moving_x >= static_cast<std::uint32_t>(x + w) || moving_x >= m_width)
244244
{
245245
moving_x = x;
246+
moving_y++;
246247
if(moving_y >= static_cast<std::uint32_t>(y + h) || moving_y >= m_height)
247248
break;
248-
moving_y++;
249249
}
250250
if constexpr(std::endian::native == std::endian::little)
251251
m_staging_buffer->GetMap<mlx_color*>()[(moving_y * m_width) + moving_x] = ReverseColor(pixels[i]);
@@ -304,9 +304,9 @@ namespace mlx
304304
if(moving_x >= static_cast<std::uint32_t>(x + w) || moving_x >= m_width)
305305
{
306306
moving_x = x;
307+
moving_y++;
307308
if(moving_y >= static_cast<std::uint32_t>(y + h) || moving_y >= m_height)
308309
break;
309-
moving_y++;
310310
}
311311
if constexpr(std::endian::native == std::endian::little)
312312
dst[i] = ReverseColor(m_staging_buffer->GetMap<mlx_color*>()[(moving_y * m_width) + moving_x]);

0 commit comments

Comments
 (0)