summaryrefslogtreecommitdiff
path: root/mq_cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'mq_cmd.c')
-rw-r--r--mq_cmd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mq_cmd.c b/mq_cmd.c
index 6bbe427..bc692a4 100644
--- a/mq_cmd.c
+++ b/mq_cmd.c
@@ -198,7 +198,9 @@ int mq_cmd_param(mq_cmd *cmd, char **param, size_t *sz)
}
strt = i;
*param = cmd->buf+strt;
- *sz = cmd->sz - strt+1;//BUG MUAHAHA
+
+ //buffer allways ends with zero, no worries
+ *sz = strlen(*param);
return 0;
}