Can't bypass ECMADoubleToInt32 in js_StringToInt32 (465239, r=danderson).

This commit is contained in:
Andreas Gal
2008-11-16 20:43:13 -08:00
parent e2e7a177df
commit e54d30fb22
2 changed files with 9 additions and 1 deletions

View File

@@ -184,7 +184,7 @@ js_StringToInt32(JSContext* cx, JSString* str)
JSSTRING_CHARS_AND_END(str, bp, end);
if (!js_strtod(cx, bp, end, &ep, &d) || js_SkipWhiteSpace(ep, end) != end)
return 0;
return (int32)d;
return js_DoubleToECMAInt32(d);
}
jsval FASTCALL