+2017-01-25 Jason Hood <jadoxa@yahoo.com.au>
+
+ Correct quoted backslash handling, per bug [#2328].
+
+ * setargv.c (__mingw32_setargv): Within single quotes, backslashes
+ should be interpreted literally; copy them as-is.
+
2017-01-25 Keith Marshall <keithmarshall@users.sourceforge.net>
Use C99 blanks as default argv separators, per issue [#2329].
* need special handling.
*/
case '\\':
- /* We don't (yet) know if this is a literal backslash,
- * (directory separator), or an escape for a following
- * quote character; just note its presence, until we
- * have looked far enough ahead to decide.
- */
- ++bslash;
+ if( quoted == '\'' )
+ /* Backslashes within single quotes are always literal.
+ */
+ *argptr++ = '\\';
+
+ else
+ /* We don't (yet) know if this is a literal backslash,
+ * (directory separator), or an escape for a following
+ * quote character; just note its presence, until we
+ * have looked far enough ahead to decide.
+ */
+ ++bslash;
break;
case '[':