From 449e75c0a9f40995152b726713bb7fc86afd2c02 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Thu, 4 Dec 2008 12:11:04 -0500 Subject: [PATCH] Fix wim="" --- common/content/ui.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/content/ui.js b/common/content/ui.js index a0328332..502da223 100644 --- a/common/content/ui.js +++ b/common/content/ui.js @@ -265,7 +265,9 @@ function CommandLine() //{{{ case this.RESET: idx = null; break; - default: idx = Math.max(0, Math.max(this.items.length - 1, idx)); + default: + idx = Math.max(0, Math.min(this.items.length - 1, idx)); + break; } this.itemList.selectItem(idx); if (idx < 0 || idx >= this.items.length || idx == null)