mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 01:29:43 +01: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:
parent
2b476bb4c1
commit
3b0757bd82
1 changed files with 6 additions and 0 deletions
|
@ -1508,6 +1508,12 @@ void Graphics::textboxadjust(void)
|
|||
|
||||
void Graphics::setlinegap(int customvalue)
|
||||
{
|
||||
if (!INBOUNDS_VEC(m, textboxes))
|
||||
{
|
||||
vlog_error("setlinegap() out-of-bounds!");
|
||||
return;
|
||||
}
|
||||
|
||||
textboxes[m].linegap = customvalue;
|
||||
textboxes[m].resize();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue