From a88b92164c50833ad017ff07e863958c892f45ae Mon Sep 17 00:00:00 2001
From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54>
Date: Sat, 22 May 2010 12:51:26 +0000
Subject: [PATCH] Keybind screen scrolls correctly on 800x600

git-svn-id: http://svn.net-core.org/repos/t-engine4@672 51575b47-30f0-44d4-a5cc-537603b46e54
---
 game/engine/Dialog.lua | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/game/engine/Dialog.lua b/game/engine/Dialog.lua
index c96cfbebd3..3c8bd5569e 100644
--- a/game/engine/Dialog.lua
+++ b/game/engine/Dialog.lua
@@ -180,7 +180,7 @@ function _M:drawSelectionList(s, x, y, hskip, list, sel, prop, scroll, max, colo
 	selcolor = selcolor or {0,255,255}
 	color = color or {255,255,255}
 	max = max or 99999
-	scroll = util.bound(scroll or 1, 1, max)
+	scroll = util.bound(scroll or 1, 1, #list)
 
 	for i = scroll, math.min(#list, scroll + max - 1) do
 		local v = list[i]
-- 
GitLab