summaryrefslogtreecommitdiff
path: root/src/gram.y
diff options
context:
space:
mode:
Diffstat (limited to 'src/gram.y')
-rw-r--r--src/gram.y3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gram.y b/src/gram.y
index d623ddb..fcfbf62 100644
--- a/src/gram.y
+++ b/src/gram.y
@@ -649,8 +649,7 @@ button : BUTTON number { $$ = $2;
}
;
-string : STRING { ptr = (char *)malloc(strlen($1)+1);
- strcpy(ptr, $1);
+string : STRING { ptr = strdup($1);
RemoveDQuote(ptr);
$$ = ptr;
}