From c2d2b9f5597c87a0cf3a8f5caa160db8846f1b8f Mon Sep 17 00:00:00 2001 From: Piotr Caban Date: Mon, 17 Aug 2009 12:11:51 +0200 Subject: [PATCH] jscript: Fixed Number's function lengths. --- dlls/jscript/number.c | 6 +++--- dlls/jscript/tests/api.js | 9 +++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/dlls/jscript/number.c b/dlls/jscript/number.c index f144455e80e..30b7a56d6a9 100644 --- a/dlls/jscript/number.c +++ b/dlls/jscript/number.c @@ -234,11 +234,11 @@ static HRESULT Number_value(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAM } static const builtin_prop_t Number_props[] = { - {toExponentialW, Number_toExponential, PROPF_METHOD}, + {toExponentialW, Number_toExponential, PROPF_METHOD|1}, {toFixedW, Number_toFixed, PROPF_METHOD}, {toLocaleStringW, Number_toLocaleString, PROPF_METHOD}, - {toPrecisionW, Number_toPrecision, PROPF_METHOD}, - {toStringW, Number_toString, PROPF_METHOD}, + {toPrecisionW, Number_toPrecision, PROPF_METHOD|1}, + {toStringW, Number_toString, PROPF_METHOD|1}, {valueOfW, Number_valueOf, PROPF_METHOD} }; diff --git a/dlls/jscript/tests/api.js b/dlls/jscript/tests/api.js index a27a7bb9b7a..ce995a0f49d 100644 --- a/dlls/jscript/tests/api.js +++ b/dlls/jscript/tests/api.js @@ -1410,4 +1410,13 @@ testFunctions(Boolean.prototype, [ ["toString", 0] ]); + +testFunctions(Number.prototype, [ + ["valueOf", 0], + ["toString", 1], + ["toExponential", 1], + ["toLocaleString", 0], + ["toPrecision", 1] + ]); + reportSuccess();