mirror of
https://github.com/rkd77/elinks.git
synced 2025-06-30 22:19:29 -04:00
ECMAScript: Fix crash on setTimeout(..., 0)
This commit is contained in:
parent
92c5be8e95
commit
e66b6737db
@ -411,6 +411,8 @@ window_setTimeout(JSContext *ctx, JSObject *obj, uintN argc, jsval *argv, jsval
|
|||||||
if (!code)
|
if (!code)
|
||||||
return JS_TRUE;
|
return JS_TRUE;
|
||||||
timeout = atoi(jsval_to_string(ctx, &argv[1]));
|
timeout = atoi(jsval_to_string(ctx, &argv[1]));
|
||||||
|
if (timeout <= 0)
|
||||||
|
return JS_TRUE;
|
||||||
ecmascript_set_timeout(interpreter, code, timeout);
|
ecmascript_set_timeout(interpreter, code, timeout);
|
||||||
return JS_TRUE;
|
return JS_TRUE;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user