mirror of
https://github.com/ccxvii/mujs.git
synced 2026-02-06 01:41:37 +08:00
fix split doesn't convert context to string if no argument is passed
This commit is contained in:
@@ -665,7 +665,7 @@ static void Sp_split(js_State *J)
|
|||||||
{
|
{
|
||||||
if (js_isundefined(J, 1)) {
|
if (js_isundefined(J, 1)) {
|
||||||
js_newarray(J);
|
js_newarray(J);
|
||||||
js_copy(J, 0);
|
js_pushstring(J, js_tostring(J, 0));
|
||||||
js_setindex(J, -2, 0);
|
js_setindex(J, -2, 0);
|
||||||
} else if (js_isregexp(J, 1)) {
|
} else if (js_isregexp(J, 1)) {
|
||||||
Sp_split_regexp(J);
|
Sp_split_regexp(J);
|
||||||
|
|||||||
Reference in New Issue
Block a user