diff --git a/js/js.parser/src/com/google/gwt/dev/js/rhino/LineBuffer.java b/js/js.parser/src/com/google/gwt/dev/js/rhino/LineBuffer.java index 5cb7c34f094..7576d2a34e0 100644 --- a/js/js.parser/src/com/google/gwt/dev/js/rhino/LineBuffer.java +++ b/js/js.parser/src/com/google/gwt/dev/js/rhino/LineBuffer.java @@ -236,11 +236,7 @@ final class LineBuffer { // Get the offset of the current character, relative to // the line that getLine() returns. int getOffset() { - if (lineStart < 0) - // The line begins somewhere in the other buffer. - return offset + (otherEnd - otherStart); - else - return offset - lineStart; + return offset - lineStart; } private boolean fill() throws IOException { @@ -269,7 +265,7 @@ final class LineBuffer { // set lineStart to a sentinel value, unless this is the first // time around. - prevStart = lineStart = (otherBuffer == null) ? 0 : -1; + prevStart = lineStart = (otherBuffer == null) ? 0 : lineStart - end; offset = 0; end = in.read(buffer, 0, buffer.length);