mirror of
https://git.checksum.fail/alec/mujs.git
synced 2025-12-08 03:59:57 +02:00
Update to latest mujs.git commit 05cd646
This commit is contained in:
@@ -61,7 +61,7 @@ static int jsB_ErrorX(js_State *J, js_Object *prototype)
|
||||
js_defproperty(J, -2, "message", JS_DONTENUM);
|
||||
}
|
||||
if (jsB_stacktrace(J, 1))
|
||||
js_defproperty(J, -2, "stackTrace", JS_DONTENUM);
|
||||
js_defproperty(J, -2, "stack", JS_DONTENUM);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ static void js_newerrorx(js_State *J, const char *message, js_Object *prototype)
|
||||
js_pushstring(J, message);
|
||||
js_setproperty(J, -2, "message");
|
||||
if (jsB_stacktrace(J, 0))
|
||||
js_setproperty(J, -2, "stackTrace");
|
||||
js_setproperty(J, -2, "stack");
|
||||
}
|
||||
|
||||
#define DERROR(name, Name) \
|
||||
|
||||
@@ -288,8 +288,10 @@ static void Sp_slice(js_State *J)
|
||||
|
||||
if (s < e)
|
||||
Sp_substring_imp(J, str, s, e - s);
|
||||
else
|
||||
else if (s > e)
|
||||
Sp_substring_imp(J, str, e, s - e);
|
||||
else
|
||||
js_pushliteral(J, "");
|
||||
}
|
||||
|
||||
static void Sp_substring(js_State *J)
|
||||
@@ -304,8 +306,10 @@ static void Sp_substring(js_State *J)
|
||||
|
||||
if (s < e)
|
||||
Sp_substring_imp(J, str, s, e - s);
|
||||
else
|
||||
else if (s > e)
|
||||
Sp_substring_imp(J, str, e, s - e);
|
||||
else
|
||||
js_pushliteral(J, "");
|
||||
}
|
||||
|
||||
static void Sp_toLowerCase(js_State *J)
|
||||
|
||||
@@ -147,7 +147,7 @@ static int nextrune(struct cstate *g)
|
||||
g->yychar = '0';
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
return 1;
|
||||
case 'u':
|
||||
if (!g->source[0] || !g->source[1] || !g->source[2] || !g->source[3])
|
||||
die(g, "unterminated escape sequence");
|
||||
@@ -159,7 +159,7 @@ static int nextrune(struct cstate *g)
|
||||
g->yychar = '0';
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
return 1;
|
||||
case 0:
|
||||
g->yychar = '0';
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user