Diff of /scintilla/src/Document.cxx [b645ec] .. [635b7c]  Maximize  Restore

  Switch to side-by-side view

--- a/scintilla/src/Document.cxx
+++ b/scintilla/src/Document.cxx
@@ -279,7 +279,7 @@
 }
 
 int SCI_METHOD Document::LineEnd(int line) const {
-	if (line == LinesTotal() - 1) {
+	if (line >= LinesTotal() - 1) {
 		return LineStart(line + 1);
 	} else {
 		int position = LineStart(line + 1);