Skip to content

Commit fd5932b

Browse files
committed
Fixed saving ANI files on big endian systems
1 parent b49d6e9 commit fd5932b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/IMG_ani.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -601,11 +601,11 @@ static bool WriteAnimation(IMG_AnimationEncoder *encoder)
601601

602602
ANIHEADER anih;
603603
SDL_zero(anih);
604-
anih.cbSizeof = sizeof(anih);
605-
anih.frames = ctx->num_frames;
606-
anih.steps = ctx->num_frames;
607-
anih.jifRate = 1;
608-
anih.fl = ANI_FLAG_ICON;
604+
anih.cbSizeof = SDL_Swap32LE(sizeof(anih));
605+
anih.frames = SDL_Swap32LE(ctx->num_frames);
606+
anih.steps = SDL_Swap32LE(ctx->num_frames);
607+
anih.jifRate = SDL_Swap32LE(1);
608+
anih.fl = SDL_Swap32LE(ANI_FLAG_ICON);
609609
result &= (SDL_WriteIO(dst, &anih, sizeof(anih)) == sizeof(anih));
610610

611611
// Info list

0 commit comments

Comments
 (0)