Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/pacman/util.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pacman/util.c b/src/pacman/util.c
index e9187529..0c6a0c09 100644
--- a/src/pacman/util.c
+++ b/src/pacman/util.c
@@ -522,7 +522,9 @@ static void table_print_line(const alpm_list_t *line, short col_padding,
continue;
}
- cell_width = (cell->mode & CELL_RIGHT_ALIGN ? (int)widths[i] : -(int)widths[i]);
+ /* calculate cell width, adjusting for multi-byte character strings */
+ cell_width = (int)widths[i] - string_length(str) + strlen(str);
+ cell_width = cell->mode & CELL_RIGHT_ALIGN ? cell_width : -cell_width;
if(need_padding) {
printf("%*s", col_padding, "");