Fix out-of-range error when parsing certain files.

An example file that breaks on this is b2f8bf1e74/kitchen-sink/demo.js (L1000)
This commit is contained in:
Tim Caswell 2014-02-07 13:05:43 -06:00
commit 0f9bcfbc7d

View file

@ -61,7 +61,7 @@ exports.$detectIndentation = function(lines, fallback) {
prevSpaces = spaces;
// ignore lines ending with backslash
while (line[line.length - 1] == "\\")
while (i < max && line[line.length - 1] == "\\")
line = lines[i++];
}