Browse Source

Bug 1745: Two consecutive different file mask delimiters are processed incorrectly

https://winscp.net/tracker/1745
(cherry picked from commit 1beb65b22829cbd386c4d2121b4104a00a2c3bee)

Source commit: 751598f8db2bcad15feca46de6db04c7c6ddd263
Martin Prikryl 6 years ago
parent
commit
fc63bd67e7
1 changed files with 2 additions and 1 deletions
  1. 2 1
      source/core/Common.cpp

+ 2 - 1
source/core/Common.cpp

@@ -216,7 +216,8 @@ UnicodeString CopyToChars(const UnicodeString & Str, int & From, UnicodeString C
     {
     {
       if (DoubleDelimiterEscapes &&
       if (DoubleDelimiterEscapes &&
           (P < Str.Length()) &&
           (P < Str.Length()) &&
-          IsDelimiter(Chs, Str, P + 1))
+          IsDelimiter(Chs, Str, P + 1) &&
+          (Str[P + 1] == Str[P]))
       {
       {
         Result += Str[P];
         Result += Str[P];
         P++;
         P++;