From 94ea9577dbeb6cee4ad22c9d9fd5af6d66e29dcc Mon Sep 17 00:00:00 2001 From: Dima Krasner Date: Sun, 26 Jan 2020 12:47:08 +0200 Subject: [PATCH] papaw: unterminated string --- papaw.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/papaw.c b/papaw.c index 58fe5ba..550c7ef 100644 --- a/papaw.c +++ b/papaw.c @@ -403,11 +403,11 @@ static char *itoa(char *s, int i) { if (i > 10) s = itoa(s, i / 10); - else - s[1] = '\0'; *s = '0' + i % 10; - return s + 1; + ++s; + *s = '\0'; + return s; } struct foot {