PascalGameDevelopment / SDL2-for-Pascal

Unit files for building Free Pascal and Delphi applications using the SDL2 library
https://pascalgamedevelopment.github.io/SDL2-for-Pascal/
Mozilla Public License 2.0
103 stars 20 forks source link

SDL2.pas: SDL_AUDIO_ISLITTLEENDIAN stack overflow #138

Closed Chixpy closed 5 months ago

Chixpy commented 5 months ago

Hello. I found another little mistake.

https://github.com/PascalGameDevelopment/SDL2-for-Pascal/blob/0fcaf6a5a93d2fd8b55726b6384ba3787b454728/units/sdl2.pas#L352-L355

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 5 months ago

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 5 months ago

Solved by PR #139. Thanks!