]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed double eol problem
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 11 Apr 2000 14:34:38 +0000 (14:34 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 11 Apr 2000 14:34:38 +0000 (14:34 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@7119 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/textfile.cpp

index 89a8e94033110da8744a5500de31205bf6e0b20f..8ae8ee4eba5c65362ae3e35e5b173dd1a88c9ebd 100644 (file)
@@ -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