From a1c37c716ba823832b193bb8ea01756e36b88765 Mon Sep 17 00:00:00 2001 From: jluehrs2 Date: Fri, 7 Sep 2007 17:55:58 -0500 Subject: off by one --- test/test.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test.lua b/test/test.lua index 0976b88..c6c24f8 100644 --- a/test/test.lua +++ b/test/test.lua @@ -18,11 +18,11 @@ while true do local c = curses.getch() if c == "left" and x > 0 then x = x - 1 - elseif c == "right" and x < maxx then + elseif c == "right" and x < maxx - 1 then x = x + 1 elseif c == "up" and y > 0 then y = y - 1 - elseif c == "down" and y < maxy then + elseif c == "down" and y < maxy - 1 then y = y + 1 elseif #c == 1 then curses.addstr(c) -- cgit v1.2.3-54-g00ecf