Merge pull request #1555 from jerch/fix_out_of_bound_deopt

fix out of bound deopt in EscapeSequenceParser.parse
This commit is contained in:
Daniel Imms
2018-07-10 17:00:58 -07:00
committed by GitHub
+2 -2
View File
@@ -375,8 +375,8 @@ export class EscapeSequenceParser extends Disposable implements IEscapeSequenceP
// shortcut for most chars (print action)
if (currentState === ParserState.GROUND && code > 0x1f && code < 0x80) {
print = (~print) ? print : i;
do code = data.charCodeAt(++i);
while (i < l && code > 0x1f && code < 0x80);
do i++;
while (i < l && data.charCodeAt(i) > 0x1f && data.charCodeAt(i) < 0x80);
i--;
continue;
}