int kanji = 0;
if (resultPtr) {
- /* worst case is a \n after every character */
- result = malloc((strlen(text) * 2) + 1);
+ /* XXX I think this will work */
+ result = malloc(strlen(text) + (strlen(text) / width) + 2);
*result = '\0';
}
}
}
- result = realloc(result, strlen(result) + 1);
-
if (badness) *badness = howbad;
if (resultPtr) *resultPtr = result;
if (heightPtr) *heightPtr = height;