shithub: mc

Download patch

ref: a6c7b6c46c1c4e9d8b4f246cdbc82ac5916cfd71
parent: 7d45fda5e85658f7864b8d9002fb67c58e6ea2e7
author: Ori Bernstein <[email protected]>
date: Fri Jun 15 15:34:08 EDT 2012

Chop off the ending quote on a string.

--- a/parse/tok.c
+++ b/parse/tok.c
@@ -214,7 +214,7 @@
             fatal(line, "Newlines not allowed in strings");
     };
     t = mktok(Tstrlit);
-    t->str = strdupn(&fbuf[sstart], fidx - sstart);
+    t->str = strdupn(&fbuf[sstart], fidx - sstart - 1);
     return t;
 }