1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-22 17:49:43 +01:00

Fix missing return statements in drawsprite()

Whoops. Otherwise the game would end up indexing out-of-bounds despite
checking for it anyways.
This commit is contained in:
Misa 2021-04-18 10:43:36 -07:00 committed by Ethan Lee
parent 1191f425b3
commit 8956b04d67

View file

@ -716,6 +716,7 @@ void Graphics::drawsprite( int x, int y, int t, int r, int g, int b )
if (!INBOUNDS_VEC(t, sprites))
{
WHINE_ONCE("drawsprite() out-of-bounds!");
return;
}
SDL_Rect rect = {x, y, sprites_rect.w, sprites_rect.h};
@ -728,6 +729,7 @@ void Graphics::drawsprite(int x, int y, int t, Uint32 c)
if (!INBOUNDS_VEC(t, sprites))
{
WHINE_ONCE("drawsprite() out-of-bounds!");
return;
}
SDL_Rect rect = {x, y, sprites_rect.w, sprites_rect.h};