From 5621ccf3784fd89dbe42800623818d4dafdad72c Mon Sep 17 00:00:00 2001 From: vps Date: Fri, 30 Jul 2021 04:49:57 +0000 Subject: [PATCH] fixed random character at end of string --- bin/chat0/src/post.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/chat0/src/post.c b/bin/chat0/src/post.c index 207d091..ea1643f 100644 --- a/bin/chat0/src/post.c +++ b/bin/chat0/src/post.c @@ -43,7 +43,7 @@ format(char *str, char **nstr) sscanf(tmp, "%x", (unsigned int *)&ret[retsize++]); } else ret[retsize++] = str[i]; } - ret[retsize + 1] = '\0'; + ret[retsize] = '\0'; *nstr = ret; } -- 2.45.2