aboutsummaryrefslogtreecommitdiffstats
path: root/shelpers.c
diff options
context:
space:
mode:
Diffstat (limited to 'shelpers.c')
-rw-r--r--shelpers.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/shelpers.c b/shelpers.c
index 0d2da24..fbde4ab 100644
--- a/shelpers.c
+++ b/shelpers.c
@@ -14,6 +14,7 @@ char *strnclone(const char *s, uint32_t n)
{
char *clone = (char *)malloc(n + 1);
strncpy(clone, s, n);
+ clone[n] = '\0';
return clone;
}