diff options
author | Dave Reisner <d@falconindy.com> | 2011-08-20 13:19:19 -0400 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-08-22 08:53:25 -0500 |
commit | c4350d90f137ff3177e68cb0bab82d14edaac54e (patch) | |
tree | e6b85367c702bbe2ccd9b8175da1087de33dba38 /src | |
parent | b6914d16cc7ee97f538b569b760c3ced18ee1fa9 (diff) |
pacman/util: use string_length to calculate line length
This is measuring strings that are potentially localized, so we need a
multibyte aware function to count characters instead of bytes.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/pacman/util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pacman/util.c b/src/pacman/util.c index 9c1e6463..d2aa29b9 100644 --- a/src/pacman/util.c +++ b/src/pacman/util.c @@ -533,7 +533,7 @@ static alpm_list_t *table_create_format(const alpm_list_t *header, /* now use the column width info to generate format strings */ for(i = longest_strs; i; i = alpm_list_next(i)) { const char *display; - colwidth = strlen(alpm_list_getdata(i)) + padding; + colwidth = string_length(alpm_list_getdata(i)) + padding; totalwidth += colwidth; /* right align the last column for a cleaner table display */ |