Skip to content

Commit

Permalink
fix test suite on big-endian
Browse files Browse the repository at this point in the history
  • Loading branch information
randy408 committed Aug 26, 2019
1 parent dc19f7a commit 9d2a631
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/test_png.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,9 @@ unsigned char *getimage_libpng(unsigned char *buf, size_t size, size_t *out_size

/* png_set_palette_to_rgb() + png_set_tRNS_to_alpha() */
png_set_expand_16(png_ptr);

png_set_swap(png_ptr);
#if __BIG_ENDIAN__ /* we want host-endian values */
png_set_swap(png_ptr);
#endif
}
else if(fmt == SPNG_FMT_RGBA8)
{
Expand Down

0 comments on commit 9d2a631

Please sign in to comment.