Sophie

Sophie

distrib > * > 2008.0 > x86_64 > by-pkgid > c40ada2415b75c4aaabc9a097388ddcb > files > 20

mc-4.6.1-17mdv2008.0.src.rpm

--- src/subshell.c	2005-06-07 11:19:19.000000000 +0200
+++ src/subshell.c.oden	2007-04-23 18:42:15.000000000 +0200
@@ -720,16 +720,19 @@
 
     /*
      * Print every character in octal format with the leading backslash.
-     * tcsh and zsh may require 4-digit octals, bash < 2.05b doesn't like them.
+     * bash >= 3.2, tcsh and zsh require 4-digit octals, 2.05b <= bash < 3.2
+     * support 3-digit octals as well as 4-digit octals.
+     * For bash < 2.05b fix below to use 3-digit octals.
      */
     if (subshell_type == BASH) {
 	for (; *s; s++) {
-	    /* Must quote numbers, so that they are not glued to octals */
+	    /* Must quote numbers, so that they are not glued to octals
+	       for bash < 3.2 */
 	    if (isalpha ((unsigned char) *s)) {
 		*d++ = (unsigned char) *s;
 	    } else {
-		sprintf (d, "\\%03o", (unsigned char) *s);
-		d += 4;
+		sprintf (d, "\\0%03o", (unsigned char) *s);
+		d += 5;
 	    }
 	}
     } else {