Bug 461307 - Crash [@ QuoteString] with for(/x/[''] in []) (r=mrbkap).

This commit is contained in:
Brendan Eich
2008-10-23 11:37:07 -07:00
parent 6a92663714
commit b0e8012ca7

View File

@@ -3252,14 +3252,18 @@ Decompile(SprintStack *ss, jsbytecode *pc, intN nb, JSOp nextop)
(jschar)'\'');
if (!xval)
return NULL;
atom = NULL;
}
lval = POP_STR();
todo = Sprint(&ss->sprinter, ss_format, lval, *lval ? "." : "");
if (todo < 0)
return NULL;
if (!QuoteString(&ss->sprinter, ATOM_TO_STRING(atom), 0))
return NULL;
if (xval) {
JS_ASSERT(*lval);
todo = Sprint(&ss->sprinter, index_format, lval, xval);
} else {
todo = Sprint(&ss->sprinter, ss_format, lval, *lval ? "." : "");
if (todo < 0)
return NULL;
if (!QuoteString(&ss->sprinter, ATOM_TO_STRING(atom), 0))
return NULL;
}
break;
case JSOP_FORELEM: