diff --git a/lib/less/parser/parser-input.js b/lib/less/parser/parser-input.js index 267ef8ea..ad799e85 100644 --- a/lib/less/parser/parser-input.js +++ b/lib/less/parser/parser-input.js @@ -239,7 +239,7 @@ module.exports = function() { parserInput.end = function() { var message, - isFinished = parserInput.i >= input.length - 1; + isFinished = parserInput.i >= input.length; if (parserInput.i < furthest) { message = furthestPossibleErrorMessage; diff --git a/test/less/errors/single-character.less b/test/less/errors/single-character.less new file mode 100644 index 00000000..c1b0730e --- /dev/null +++ b/test/less/errors/single-character.less @@ -0,0 +1 @@ +x \ No newline at end of file diff --git a/test/less/errors/single-character.txt b/test/less/errors/single-character.txt new file mode 100644 index 00000000..b9e49a5e --- /dev/null +++ b/test/less/errors/single-character.txt @@ -0,0 +1,2 @@ +ParseError: Unrecognised input. Possibly missing something in {path}single-character.less on line 1, column 2: +1 x