From 96cf1fb40cb7233a176e1dfd512ed41f2da5437f Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Fri, 15 Jun 2012 17:37:55 +0000 Subject: (return_files) fix RPMTAG_OLDFILENAMES case was broken since commit r250325 by pixel on Tue Dec 9 2008 +0000: "- adapt to rpm 4.6 changes: headerGetEntry -> headerGet" previously count was initialized the right way this show it's unused since it's broken for 4 years this is a theoric issues since RPMTAG_(BASENAMES|DIRINDEXES|_DIRNAMES) date from 1999... --- URPM.xs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/URPM.xs b/URPM.xs index 285d483..c17506e 100644 --- a/URPM.xs +++ b/URPM.xs @@ -707,7 +707,8 @@ return_files(const Header header, int filter_mode) { rpmtdInit(&td_list); } - for(i = 0; i < rpmtdCount(&td_baseNames); i++) { + int count = is_oldfilenames ? rpmtdCount(&td_list) : rpmtdCount(&td_baseNames); + for(i = 0; i < count; i++) { if (is_oldfilenames) { s = rpmtdNextString(&td_list); len = strlen(s); -- cgit v1.2.1