Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/add.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/add.c')
-rw-r--r--lib/libalpm/add.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index 6c6fc6b6..6fcc6442 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -328,8 +328,8 @@ int add_commit(pmtrans_t *trans, pmdb_t *db)
oldpkg = pkg_new();
if(oldpkg) {
if(!(local->infolevel & INFRQ_FILES)) {
- char name[(PKG_NAME_LEN-1)+1+(PKG_VERSION_LEN-1)+1];
- snprintf(name, (PKG_NAME_LEN-1)+1+(PKG_VERSION_LEN-1)+1, "%s-%s", local->name, local->version);
+ char name[PKG_FULLNAME_LEN];
+ snprintf(name, PKG_FULLNAME_LEN, "%s-%s", local->name, local->version);
_alpm_log(PM_LOG_DEBUG, "loading FILES info for %s", local->name);
db_read(db, name, INFRQ_FILES, local);
}