summaryrefslogtreecommitdiff
path: root/src/parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser.c')
-rw-r--r--src/parser.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/parser.c b/src/parser.c
index d60c142..c9d711b 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -343,7 +343,7 @@ p_check_variable(ParserState* state, gchar* name)
if(utf8_next_char(name)[0] != '\0')
{
result = 1;
- buffer = (gchar*) malloc(sizeof(gchar) * strlen(name));
+ buffer = (gchar*) malloc(sizeof(gchar) * (strlen(name) + 1));
for(c = name; *c != '\0'; c = next)
{
next = utf8_next_char(c);