Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

infinite loop when tracing the error line #15

Closed
jviereck opened this issue Apr 27, 2010 · 2 comments
Closed

infinite loop when tracing the error line #15

jviereck opened this issue Apr 27, 2010 · 2 comments

Comments

@jviereck
Copy link

In some situations when the .less file is not 100% valid, the following line can produce a infinite loop:

for (var n = i, column = -1; input[n] !== '\n'; n--) { column++ }

I fixed it by adding a check to the n variable:

for (var n = i, column = -1; input[n] !== '\n' && n >= 0; n--) { column++ }

The file I tried to parse started like this:

[object Object]/* ***** BEGIN LICENSE BLOCK *****
@cloudhead
Copy link
Member

Thanks, I'll make sure I fix that!

@cloudhead
Copy link
Member

This was fixed by jamesfoster at some point.

dhaber pushed a commit to dhaber/less.js that referenced this issue Jan 14, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants