aboutsummaryrefslogtreecommitdiffstats
path: root/URPM.xs
diff options
context:
space:
mode:
Diffstat (limited to 'URPM.xs')
-rw-r--r--URPM.xs6
1 files changed, 2 insertions, 4 deletions
diff --git a/URPM.xs b/URPM.xs
index c17170f..05cdc80 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -1821,12 +1821,10 @@ Pkg_epoch(pkg)
URPM::Package pkg
CODE:
if (pkg->info) {
- char *s, *eos;
+ char *s;
if ((s = strchr(pkg->info, '@')) != NULL) {
- if ((eos = strchr(s+1, '@')) != NULL) *eos = 0; /* mark end of string to enable searching backwards */
- RETVAL = atoi(s+1);
- if (eos != NULL) *eos = '@';
+ RETVAL = strtoul(s+1, NULL, 10);
} else {
RETVAL = 0;
}