summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-07-12 06:39:36 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:20:10 -0500
commit102e24761189306fdf6233481ada43e99a56b5e7 (patch)
tree5198db1641f1321de995d63f38f729b52d467f62
parentfdb91826aae19afe672b9d7bdff90b5260bcae88 (diff)
downloadsamba-102e24761189306fdf6233481ada43e99a56b5e7.tar.gz
samba-102e24761189306fdf6233481ada43e99a56b5e7.tar.bz2
samba-102e24761189306fdf6233481ada43e99a56b5e7.zip
r8354: work around a js bug found by tpot
(This used to be commit c6f7ace3333af31bc0d37264b3d8a75c79bb88e4)
-rw-r--r--swat/scripting/common.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/swat/scripting/common.js b/swat/scripting/common.js
index cdf18d1c9b..2e90c1b469 100644
--- a/swat/scripting/common.js
+++ b/swat/scripting/common.js
@@ -100,10 +100,11 @@ function display_menu(m) {
}
function simple_menu() {
- var m = MenuObj(arguments[0], (arguments.length-1)/2);
+ var i, m = MenuObj(arguments[0], (arguments.length-1)/2);
for (i=0;i<m.element.length;i++) {
- m.element[i].label = arguments[1+(i*2)];
- m.element[i].link = arguments[2+(i*2)];
+ var ndx = i*2;
+ m.element[i].label = arguments[ndx+1];
+ m.element[i].link = arguments[ndx+2];
}
display_menu(m);
}