mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03: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:
@@ -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};
|
||||
|
||||
Reference in New Issue
Block a user