mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 09:28:15 +03:00
Add bounds check to setlinegap
This is for consistency with all other functions dealing with the latest created text box. There are several cases in custom levels where these functions can be called even though there are no text boxes on screen.
This commit is contained in:
@@ -1508,6 +1508,12 @@ void Graphics::textboxadjust(void)
|
|||||||
|
|
||||||
void Graphics::setlinegap(int customvalue)
|
void Graphics::setlinegap(int customvalue)
|
||||||
{
|
{
|
||||||
|
if (!INBOUNDS_VEC(m, textboxes))
|
||||||
|
{
|
||||||
|
vlog_error("setlinegap() out-of-bounds!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
textboxes[m].linegap = customvalue;
|
textboxes[m].linegap = customvalue;
|
||||||
textboxes[m].resize();
|
textboxes[m].resize();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user