Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/libalpm/be_local.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libalpm/be_local.c b/lib/libalpm/be_local.c
index ee805b9e..a8c8468b 100644
--- a/lib/libalpm/be_local.c
+++ b/lib/libalpm/be_local.c
@@ -688,6 +688,8 @@ static int local_db_read(alpm_pkg_t *info, alpm_dbinfrq_t inforeq)
}
/* attempt to hand back any memory we don't need */
files = realloc(files, sizeof(alpm_file_t) * files_count);
+ /* make sure the list is sorted */
+ qsort(files, files_count, sizeof(alpm_file_t), _alpm_files_cmp);
info->files.count = files_count;
info->files.files = files;
} else if(strcmp(line, "%BACKUP%") == 0) {