From 493ae380d5200e00b8648fcb334e39148126676f Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Thu, 2 May 2013 02:03:41 +0200
Subject: [PATCH] Replaced obsolete end-of-list detection with new one.

---
 roguelike.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/roguelike.c b/roguelike.c
index 34f3c85..7d535bc 100644
--- a/roguelike.c
+++ b/roguelike.c
@@ -218,7 +218,7 @@ void draw_keys_window (struct Win * win) {
   attr_t attri;
   int y, x;
   char * keyname;
-  for (y = 0; 0 != keybindings[offset + y].name && y < win->height; y++) {
+  for (y = 0; y <= keyswindata->max && y < win->height; y++) {
     attri = 0;
     if (y == keyswindata->select - offset) {
       attri = A_REVERSE;
-- 
2.30.2