From 3cb84cf7fdc2a85f22e1ee39f0e22eac369fb1a4 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Orsini Date: Wed, 27 Nov 2013 07:31:16 +0000 Subject: [PATCH] fixed bug when description contains special chars --- src/tw.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/tw.c b/src/tw.c index cbf3d61..926a039 100644 --- a/src/tw.c +++ b/src/tw.c @@ -234,22 +234,18 @@ static char *escape(const char *txt) void tw_modify_description(const char *uuid, const char *newdesc) { - char *str; char *opts; - str = escape(newdesc); - opts = malloc(1 + strlen(uuid) + strlen(" modify :\"") - + strlen(str) + + strlen(newdesc) + strlen("\"") + 1); - sprintf(opts, " %s modify \"%s\"", uuid, str); + sprintf(opts, " %s modify \"%s\"", uuid, newdesc); tw_exec(opts); - free(str); free(opts); } -- 2.7.4