1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-30 20:02:27 +01:00

Fix setting "number" options.

--HG--
extra : rebase_source : 037b69f01b7501978e2c61037c26f9dde55192d7
This commit is contained in:
Kris Maglione
2010-09-22 02:07:08 -04:00
parent f3c82a85a1
commit 877ea957ca

View File

@@ -421,7 +421,7 @@ const Option = Class("Option", {
number: function (operator, values, scope, invert) {
// TODO: support floats? Validators need updating.
if (!/^[+-]?(?:0x[0-9a-f]+|0[0-7]*|[1-9]+)$/i.test(values))
if (!/^[+-]?(?:0x[0-9a-f]+|0[0-7]*|[1-9][0-9]*)$/i.test(values))
return "E521: Number required after := " + this.name + "=" + values;
let value = parseInt(values);