X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c23894955325535bf603be74a3c0dc8d3fce65ab..9018abe3ef28d237b0421c8d96987907adbe5532:/include/wx/textfile.h diff --git a/include/wx/textfile.h b/include/wx/textfile.h index 4aefef1e5a..1747218f27 100644 --- a/include/wx/textfile.h +++ b/include/wx/textfile.h @@ -74,7 +74,7 @@ public: // you're using "direct access" i.e. GetLine() size_t GetCurrentLine() const { return m_nCurLine; } void GoToLine(size_t n) { m_nCurLine = n; } - bool Eof() const { return m_nCurLine == m_aLines.Count(); } + bool Eof() const { return m_nCurLine == m_aLines.Count() - 1; } // these methods allow more "iterator-like" traversal of the list of // lines, i.e. you may write something like: