PascalGameDevelopment/SDL2-for-Pascal

SDL2.pas: SDL_AUDIO_ISLITTLEENDIAN stack overflow

Chixpy opened this issue · 2 comments

Chixpy commented

Hello. I found another little mistake.

function SDL_AUDIO_ISLITTLEENDIAN(x: Cardinal): Cardinal;
begin
Result := not SDL_AUDIO_ISLITTLEENDIAN(x);
end;

It's calling itself recursively, when clearly we want to call SDL_AUDIO_ISBIGENDIAN

function SDL_AUDIO_ISLITTLEENDIAN(x: Cardinal): Cardinal;
begin
  Result := not SDL_AUDIO_ISBIGENDIAN(x);
end;

Can I make a fast PR to fix it?

suve commented

Oh oops. Well that's embarrassing.

Can I make a fast PR to fix it?

Sure. For small fixes like these, feel free to open a PR right away.

suve commented

Solved by PR #139. Thanks!