Skip to content

Commit

Permalink
papaw: unterminated string
Browse files Browse the repository at this point in the history
  • Loading branch information
dimkr committed Jan 26, 2020
1 parent 4f30e88 commit 94ea957
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions papaw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 94ea957

Please sign in to comment.