Skip to content

Commit

Permalink
prevent potential infinite loops
Browse files Browse the repository at this point in the history
  • Loading branch information
dyc3 committed Nov 24, 2017
1 parent 26b8010 commit 0177eb7
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -301,7 +301,7 @@ export class ReplExpressionsRenderer implements IRenderer {
let codes = [];
if (chr && chr === '[') {
let code: string = null;
while (chr !== 'm') {
while (chr !== 'm' && codes.length <= 7) {
chr = (++index < len ? text.charAt(index) : null);

if (chr && chr >= '0' && chr <= '9') {
Expand Down

0 comments on commit 0177eb7

Please sign in to comment.