summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDave Reisner <d@falconindy.com>2011-08-20 19:19:19 +0200
committerDan McGee <dan@archlinux.org>2011-08-22 15:53:25 +0200
commitc4350d90f137ff3177e68cb0bab82d14edaac54e (patch)
treee6b85367c702bbe2ccd9b8175da1087de33dba38 /src
parentb6914d16cc7ee97f538b569b760c3ced18ee1fa9 (diff)
downloadpacman-c4350d90f137ff3177e68cb0bab82d14edaac54e.tar.gz
pacman-c4350d90f137ff3177e68cb0bab82d14edaac54e.tar.xz
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.c2
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 */