diff options
Diffstat (limited to 'src/basic')
-rw-r--r-- | src/basic/format-table.c | 2 | ||||
-rw-r--r-- | src/basic/string-util.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/basic/format-table.c b/src/basic/format-table.c index 774f1f17d..fe7c35193 100644 --- a/src/basic/format-table.c +++ b/src/basic/format-table.c @@ -1174,7 +1174,7 @@ int table_print(Table *t, FILE *f) { if (l > width[j]) { /* Field is wider than allocated space. Let's ellipsize */ - buffer = ellipsize_mem(field, (size_t) -1, width[j], d->ellipsize_percent); + buffer = ellipsize(field, width[j], d->ellipsize_percent); if (!buffer) return -ENOMEM; diff --git a/src/basic/string-util.c b/src/basic/string-util.c index 13456f101..1f8bf3d4d 100644 --- a/src/basic/string-util.c +++ b/src/basic/string-util.c @@ -545,7 +545,7 @@ char *ellipsize_mem(const char *s, size_t old_length, size_t new_length, unsigne return strdup(""); /* If no multibyte characters use ascii_ellipsize_mem for speed */ - if (ascii_is_valid(s)) + if (ascii_is_valid_n(s, old_length)) return ascii_ellipsize_mem(s, old_length, new_length, percent); x = ((new_length - 1) * percent) / 100; |