mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-11-26 07:14:20 +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:
1 parent
1191f425b3
commit
8956b04d67
1 file changed
+2
@@ -716,6 +716,7 @@ void Graphics::drawsprite( int x, int y, int t, int r, int g, int b )
|
|||||||
if (!INBOUNDS_VEC(t, sprites))
|
if (!INBOUNDS_VEC(t, sprites))
|
||||||
{
|
{
|
||||||
WHINE_ONCE("drawsprite() out-of-bounds!");
|
WHINE_ONCE("drawsprite() out-of-bounds!");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
SDL_Rect rect = {x, y, sprites_rect.w, sprites_rect.h};
|
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))
|
if (!INBOUNDS_VEC(t, sprites))
|
||||||
{
|
{
|
||||||
WHINE_ONCE("drawsprite() out-of-bounds!");
|
WHINE_ONCE("drawsprite() out-of-bounds!");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
SDL_Rect rect = {x, y, sprites_rect.w, sprites_rect.h};
|
SDL_Rect rect = {x, y, sprites_rect.w, sprites_rect.h};
|
||||||
|
|||||||
Reference in new issue
Block a user