1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-08-13 17:03:46 -04:00

Handle printing NULL correctly in table display

Treat this value as the empty string.

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dan McGee 2012-03-14 22:18:37 -04:00
parent 930e93b892
commit 56f821b72a

View File

@ -500,6 +500,9 @@ static void table_print_line(const alpm_list_t *line, short col_padding,
}
value = curcell->data;
if(!value) {
value = "";
}
/* silly printf requires padding size to be an int */
cell_padding = (int)widths[i] - (int)string_length(value);
if(cell_padding < 0) {