Skip to content

Commit

Permalink
Revert "🐛 fix(Renderer/Image.cpp): bad moving_y bounds checking" (#125)
Browse files Browse the repository at this point in the history
Reverts #123
  • Loading branch information
Kbz-8 authored Feb 24, 2025
2 parents cc0e674 + c06a0fb commit ba60f93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion runtime/Sources/Renderer/Image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,9 +304,9 @@ namespace mlx
if(moving_x >= static_cast<std::uint32_t>(x + w) || moving_x >= m_width)
{
moving_x = x;
moving_y++;
if(moving_y >= static_cast<std::uint32_t>(y + h) || moving_y >= m_height)
break;
moving_y++;
}
if constexpr(std::endian::native == std::endian::little)
dst[i] = ReverseColor(m_staging_buffer->GetMap<mlx_color*>()[(moving_y * m_width) + moving_x]);
Expand Down

0 comments on commit ba60f93

Please sign in to comment.