summaryrefslogtreecommitdiff
path: root/mq_cmd.c
diff options
context:
space:
mode:
authorFreeArtMan <dos21h@gmail.com>2017-05-04 22:21:39 +0100
committerFreeArtMan <dos21h@gmail.com>2017-05-04 22:21:39 +0100
commit417edbce2abde566e94d8986b487293d55e173c0 (patch)
tree133db23e0c58704f06447a77e8a1e964bf98be2c /mq_cmd.c
parent0a24537719de7cab1b4df46e7d6a22564f66ec6a (diff)
downloadagni-417edbce2abde566e94d8986b487293d55e173c0.tar.gz
agni-417edbce2abde566e94d8986b487293d55e173c0.zip
Added new commands CMD,SHA1. Added support of params for commands. Fixed some bugs with uninitialised buffers
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;
}