Skip to content

Commit

Permalink
Only check the MSB of the Jaguar sprite post for 0xFE
Browse files Browse the repository at this point in the history
  • Loading branch information
viciious committed Nov 5, 2023
1 parent 8423e17 commit 5f7439f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Graphics/SImage/SImageFormats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -892,11 +892,11 @@ bool SImage::loadJaguarSprite(const uint8_t* header, int hdr_size, const uint8_t
// Okay, so it's finally time to read some pixel data
for (int w = 0; w < width_; ++w)
{
int top;
int post_p = col_offsets[w];
// Process all posts in the column
while (memory::readB16(header, post_p) != 0xFFFF)
while ((top = header[post_p]) != 0xFF)
{
int top = header[post_p];
int len = header[post_p + 1];
int pixel_p = memory::readB16(header, post_p + 2);
if (pixel_p + len > size)
Expand Down

0 comments on commit 5f7439f

Please sign in to comment.