From: Vadim Zeitlin Date: Sat, 6 Feb 1999 23:17:31 +0000 (+0000) Subject: wxTextFile::Eof() bug corrected (always returned FALSE before) X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/d79b79b5e8f35e92fbbf0d74c3514dc37642e5aa wxTextFile::Eof() bug corrected (always returned FALSE before) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1620 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- 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: