瀏覽代碼

Issue 2324 – Rare incorrect conversion of line endings when downloading

https://winscp.net/tracker/2324

Source commit: dc48cd968f2d4f31289b5b7026b8b3627ba50f7f
Martin Prikryl 11 月之前
父節點
當前提交
a2f9fb0b44
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      source/core/FileBuffer.cpp

+ 2 - 0
source/core/FileBuffer.cpp

@@ -142,6 +142,8 @@ void __fastcall TFileBuffer::Convert(char * Source, char * Dest, int Params,
       else if ((Index == 0) && PrevToken && (*Ptr == Dest[1]))
       {
         Delete(Index, 1);
+        Index--;
+        Ptr = Data + Index;
       }
       // we are ending with the first char of destination 2-char EOL format,
       // append the second char and make sure we strip it from the next buffer, if any