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:
parent
930e93b892
commit
56f821b72a
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user