Bustage fix, r=redness

This commit is contained in:
Jeff Walden
2010-03-09 15:07:38 -08:00
parent e1d797671d
commit a401559429

View File

@@ -2233,7 +2233,7 @@ array_sort(JSContext *cx, uintN argc, jsval *vp)
* the elements.
*/
#if JS_BITS_PER_WORD == 32
if (size_t(newlen) > SIZE_MAX / (4 * sizeof(jsval))) {
if (size_t(newlen) > size_t(-1) / (4 * sizeof(jsval))) {
js_ReportAllocationOverflow(cx);
return false;
}