(plurize): Fix the max. string length calculation for the 'y' case.
It was off by one because 'y' is removed from the string.
This commit is contained in:
parent
c345ab82d3
commit
3d68c0a0da
1 changed files with 1 additions and 1 deletions
|
@ -68,7 +68,7 @@ plurize(char *buf, int size, int n)
|
|||
switch(buf[len - 1]) {
|
||||
case 'y':
|
||||
buf[len - 1] = '\0';
|
||||
strncat(buf, "ies", size - len - 1);
|
||||
strncat(buf, "ies", size - len);
|
||||
break;
|
||||
case 's':
|
||||
strncat(buf, "es", size - len - 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue