From: Takashi Sawanaka Date: Mon, 15 Oct 2018 13:03:15 +0000 (+0900) Subject: DiffTextBuffer.cpp: Last line was not saved when last line has no EOL X-Git-Tag: 2.16.4+-jp-10~170^2~31 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=e002360ed8f4ecfaebae2c8d6125b5b0b8db4813;p=winmerge-jp%2Fwinmerge-jp.git DiffTextBuffer.cpp: Last line was not saved when last line has no EOL --- diff --git a/Src/DiffTextBuffer.cpp b/Src/DiffTextBuffer.cpp index 8a19955af..21fab1c24 100644 --- a/Src/DiffTextBuffer.cpp +++ b/Src/DiffTextBuffer.cpp @@ -572,8 +572,11 @@ int CDiffTextBuffer::SaveToFile (const String& pszFileName, if (line == lastRealLine || lastRealLine == -1 ) { // If original last line had no EOL, then we are done - if( !m_aLines[line].HasEol() ) + if( !m_aLines[line].HasEol() ) + { + file.WriteString(sLine); break; + } // Otherwise, add the appropriate EOL to the last line ... }