mirror of
https://github.com/moparisthebest/pacman
synced 2025-01-09 13:07:58 -05:00
Fix value of ngettext() count parameter in callback
I was awesome and ran alpm_list_count() on an empty list. Fail. Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
36df611203
commit
36c570712a
@ -285,10 +285,11 @@ void cb_trans_conv(pmtransconv_t event, void *data1, void *data2,
|
|||||||
{
|
{
|
||||||
alpm_list_t *unresolved = (alpm_list_t *) data1;
|
alpm_list_t *unresolved = (alpm_list_t *) data1;
|
||||||
alpm_list_t *namelist = NULL, *i;
|
alpm_list_t *namelist = NULL, *i;
|
||||||
size_t count = alpm_list_count(namelist);
|
size_t count = 0;
|
||||||
for (i = unresolved; i; i = i->next) {
|
for (i = unresolved; i; i = i->next) {
|
||||||
namelist = alpm_list_add(namelist,
|
namelist = alpm_list_add(namelist,
|
||||||
(char *)alpm_pkg_get_name(i->data));
|
(char *)alpm_pkg_get_name(i->data));
|
||||||
|
count++;
|
||||||
}
|
}
|
||||||
printf(_n(
|
printf(_n(
|
||||||
":: The following package cannot be upgraded due to unresolvable dependencies:\n",
|
":: The following package cannot be upgraded due to unresolvable dependencies:\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user