mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-11-05 02:39:41 +01:00
Fix off-by-one in script editor letting you type on a nonexistent line
For a long time, the script editor has had a bug where it would let you put the cursor on a nonexistent script line, which would APPEAR to be the last line of the script... but in reality, it WASN'T the last line of the script, and in fact, the ACTUAL last line was the line ABOVE the script. So, if you typed anything on this nonexistent line, it would appear to get erased when exiting the script. Thus, people have (erroneously) misdiagnosed this as the script editor somehow being trigger-happy and erasing lines when it shouldn't be, when in reality it should've have let you gone onto that line in the first place!
This commit is contained in:
parent
134a0f1070
commit
b1d6b7f395
1 changed files with 1 additions and 1 deletions
|
@ -3834,7 +3834,7 @@ void editorinput( KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map, enti
|
||||||
if(key.keymap[SDLK_DOWN] && ed.keydelay<=0)
|
if(key.keymap[SDLK_DOWN] && ed.keydelay<=0)
|
||||||
{
|
{
|
||||||
ed.keydelay=6;
|
ed.keydelay=6;
|
||||||
if(ed.sby+ed.pagey<ed.sblength)
|
if(ed.sby+ed.pagey<ed.sblength-1)
|
||||||
{
|
{
|
||||||
ed.sby++;
|
ed.sby++;
|
||||||
if(ed.sby>=20)
|
if(ed.sby>=20)
|
||||||
|
|
Loading…
Reference in a new issue