зеркало из https://github.com/mozilla/gecko-dev.git
Bug 63117 Numbers in prefs accepted in octal when started with 0 and hexadecimal when started with 0x
patch by eddyk@netscape.com/durbacher@gmx.de, r=neil sr=alecf
This commit is contained in:
Родитель
28dedf278a
Коммит
48912345e6
|
@ -242,7 +242,12 @@ nsPrefWindow.prototype =
|
|||
value = !value;
|
||||
break;
|
||||
case "int":
|
||||
value = parseInt(value);
|
||||
if( value.match(/[^\d\s]/) )
|
||||
{ // reload old value to avoid setting an invalid one
|
||||
value = this.getPref(preftype, itemObject.prefstring)
|
||||
break;
|
||||
}
|
||||
value = parseInt(value, 10);
|
||||
break;
|
||||
case "color":
|
||||
if( toString(value) == "" )
|
||||
|
|
Загрузка…
Ссылка в новой задаче