From c8d4a993c1cd7b7df81e227febcc52496e5b9149 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 19 Oct 2000 16:45:14 +0000 Subject: [PATCH] backported fix for Translate() from the main branch git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8585 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/textfile.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/common/textfile.cpp b/src/common/textfile.cpp index fc3c622d64..c4863f5bc3 100644 --- a/src/common/textfile.cpp +++ b/src/common/textfile.cpp @@ -118,6 +118,10 @@ wxString wxTextFile::Translate(const wxString& text, wxTextFileType type) if ( chLast == _T('\r') ) { // Mac line termination result += eol; + + // reset chLast to avoid inserting another eol before the + // next character + chLast = 0; } // add to the current line