shithub: mc

Download patch

ref: 097a3ddbf9b515200f31bae8343b696a58343fb3
parent: 1305df9b20460769d853304a8bc2ad69bc178d0a
author: Ori Bernstein <[email protected]>
date: Thu Dec 26 16:44:48 EST 2013

Escape '\' embedded in strings correctly.

    We were forgetting to emit them as '\\' in the assembly source. Oops.

--- a/6/isel.c
+++ b/6/isel.c
@@ -938,7 +938,7 @@
     for (i = 0; i < sz; i++) {
         if (i % 60 == 0)
             fprintf(fd, "\t.ascii \"");
-        if (p[i] == '"')
+        if (p[i] == '"' || p[i] == '\\')
             fprintf(fd, "\\");
         if (isprint(p[i]))
             fprintf(fd, "%c", p[i]);