mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 01:59: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:
parent
1191f425b3
commit
8956b04d67
1 changed files with 2 additions and 0 deletions
|
@ -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};
|
||||
|
|
Loading…
Reference in a new issue