From b1d6b7f395b8a749463e53717c1f3cb6edb7b750 Mon Sep 17 00:00:00 2001 From: Info Teddy Date: Sat, 18 Jan 2020 17:38:36 -0800 Subject: [PATCH] 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! --- desktop_version/src/editor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop_version/src/editor.cpp b/desktop_version/src/editor.cpp index dd2c116e..1375889a 100644 --- a/desktop_version/src/editor.cpp +++ b/desktop_version/src/editor.cpp @@ -3834,7 +3834,7 @@ void editorinput( KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map, enti if(key.keymap[SDLK_DOWN] && ed.keydelay<=0) { ed.keydelay=6; - if(ed.sby+ed.pagey=20)