]> git.pond.sub.org Git - empserver/commitdiff
(plurize): Fix the max. string length calculation for the 'y' case.
authorRon Koenderink <rkoenderink@yahoo.ca>
Sat, 19 Nov 2005 12:11:09 +0000 (12:11 +0000)
committerRon Koenderink <rkoenderink@yahoo.ca>
Sat, 19 Nov 2005 12:11:09 +0000 (12:11 +0000)
It was off by one because 'y' is removed from the string.

src/lib/gen/plur.c

index e12c05653776934021476aec54287b242eda8c45..b209745bdb3f0198daa154d23b730591f0976322 100644 (file)
@@ -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);