From 2dfa1d9e11128c9708bbf55feeb442471828ac63 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 27 Mar 2006 20:39:48 +0000 Subject: [PATCH] fix bug in Eof() which returned true even if we were only on the last line, not beyond it git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38395 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/textbuf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/wx/textbuf.h b/include/wx/textbuf.h index 75c69f2272..3dec00b608 100644 --- a/include/wx/textbuf.h +++ b/include/wx/textbuf.h @@ -106,7 +106,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_aLines.size() == 0 || m_nCurLine == m_aLines.size() - 1); } + bool Eof() const { return m_nCurLine == m_aLines.size(); } // these methods allow more "iterator-like" traversal of the list of // lines, i.e. you may write something like: -- 2.47.2