From 8292ba16ea3b03c8dd1e18cab91625bffb859475 Mon Sep 17 00:00:00 2001
From: Albert Graef <aggraef@gmail.com>
Date: Wed, 29 Jun 2016 20:53:34 +0200
Subject: [PATCH] Fix to escape_double_quotes, fixes issue #76.

---
 pd/src/s_inter.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pd/src/s_inter.c b/pd/src/s_inter.c
index b6e4d129f..cbae4754e 100644
--- a/pd/src/s_inter.c
+++ b/pd/src/s_inter.c
@@ -756,7 +756,7 @@ static void escape_double_quotes(const char *src) {
     while(*s)
     {
         len++;
-        if (*s == '\"')
+        if (*s == '\"' || *s == '\\')
         {
             dq++;
         }
@@ -771,10 +771,10 @@ static void escape_double_quotes(const char *src) {
         s = src;
         while(*s)
         {
-            if (*s == '\"')
+            if (*s == '\"' || *s == '\\')
             {
                 *tmp++ = '\\';
-                *tmp++ = '\"';
+                *tmp++ = *s;
             }
             else
             {
-- 
GitLab