]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Do not escaper single quote in minimal escaping mode.
authorToni Wilen <twilen@winuae.net>
Sun, 7 Jan 2024 09:45:13 +0000 (11:45 +0200)
committerToni Wilen <twilen@winuae.net>
Sun, 7 Jan 2024 09:45:13 +0000 (11:45 +0200)
cfgfile.cpp

index 49eaff2edce662ef4a1a96a28eb0dcb304ff4e35..a5e69af24afb61f6991f48b0d190ad26e91ef3de 100644 (file)
@@ -577,7 +577,7 @@ static TCHAR *cfgfile_escape (const TCHAR *s, const TCHAR *escstr, bool quote, b
                TCHAR c = s[i];
                if (c == 0)
                        break;
-               if ((c == '\\' && !min) || c == '\"' || c == '\'') {
+               if ((c == '\\' && !min) || c == '\"' || (c == '\'' && !min)) {
                        *p++ = '\\';
                        *p++ = c;
                } else if (c >= 32 && !quote) {