summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKris Maglione <maglione.k@gmail.com>2011-05-27 20:03:35 -0400
committerKris Maglione <maglione.k@gmail.com>2011-05-27 20:03:35 -0400
commit1632e5d594e2d3a10237b90cc087af3b92cf82af (patch)
tree1887fc7c5300771953c4e6b9d649795dd084bea4
parent015620921ad28ab8e92781ae522fc42e48171f42 (diff)
downloadpentadactyl-1632e5d594e2d3a10237b90cc087af3b92cf82af.tar.gz
Fix ex grr.
-rw-r--r--common/modules/commands.jsm6
1 files changed, 4 insertions, 2 deletions
diff --git a/common/modules/commands.jsm b/common/modules/commands.jsm
index 107404c0..a3c388c5 100644
--- a/common/modules/commands.jsm
+++ b/common/modules/commands.jsm
@@ -410,10 +410,12 @@ var Ex = Module("Ex", {
else {
let opt = cmd.optionMap["-" + k];
let val = opt.type && opt.type.parse(v);
+
util.assert(val != null && (typeof val !== "number" || !isNaN(val)),
_("option.noSuch", k));
- Class.replaceProperty(args, opt.names[0], val);
- args.explicitOpts[opt.names[0]] = val;
+
+ Class.replaceProperty(res, opt.names[0], val);
+ res.explicitOpts[opt.names[0]] = val;
}
for (let [i, val] in array.iterItems(args))
res[i] = String(val);