aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPer Øyvind Karlsen <peroyvind@mandriva.org>2011-06-21 12:14:22 +0000
committerPer Øyvind Karlsen <peroyvind@mandriva.org>2011-06-21 12:14:22 +0000
commit891573e7ea78211ba19cccf20f5787283427ea08 (patch)
tree3826c953ef5f26291280c9a9b1a4fdaa0db7218f
parent0fc7dbe78c18fa28190b5cb6939f2fdef7ab731b (diff)
downloadperl-URPM-891573e7ea78211ba19cccf20f5787283427ea08.tar
perl-URPM-891573e7ea78211ba19cccf20f5787283427ea08.tar.gz
perl-URPM-891573e7ea78211ba19cccf20f5787283427ea08.tar.bz2
perl-URPM-891573e7ea78211ba19cccf20f5787283427ea08.tar.xz
perl-URPM-891573e7ea78211ba19cccf20f5787283427ea08.zip
fix release string returned for packages having disttag containing terminating '0's
-rw-r--r--URPM.xs2
1 files changed, 1 insertions, 1 deletions
diff --git a/URPM.xs b/URPM.xs
index a83b1e3..f41b3ae 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -1724,7 +1724,7 @@ Pkg_release(pkg)
get_fullname_parts(pkg, NULL, NULL, &release, &arch, NULL);
if (arch - release < 1) croak("invalid fullname");
- XPUSHs(sv_2mortal(newSVpv(release, arch-release-1)));
+ XPUSHs(sv_2mortal(newSVpv(release, arch[-2] ? arch-release-1 : 0)));
restore_chars();
} else if (pkg->h) {
XPUSHs(sv_2mortal(newSVpv(get_name(pkg->h, RPMTAG_RELEASE), 0)));