From 1849f54ad9145de0ca41ff003e42a38afd989d5a Mon Sep 17 00:00:00 2001 From: Michael Schroeder Date: Wed, 17 Apr 2013 15:39:50 +0200 Subject: split arch from the right for debian/haiku (thanks Ingo!) --- src/selection.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/selection.c') diff --git a/src/selection.c b/src/selection.c index 8fc1998..2b9d434 100644 --- a/src/selection.c +++ b/src/selection.c @@ -686,7 +686,7 @@ selection_canon(Pool *pool, Queue *selection, const char *name, int flags) return 0; } /* is there a vaild arch? */ - if ((r2 = strchr(r, '_')) != 0 && r[1] && (archid = str2archid(pool, r + 1)) != 0) + if ((r2 = strrchr(r, '_')) != 0 && r[1] && (archid = str2archid(pool, r + 1)) != 0) { *r2 = 0; /* split off */ selection_filter_rel(pool, selection, REL_ARCH, archid); @@ -709,7 +709,7 @@ selection_canon(Pool *pool, Queue *selection, const char *name, int flags) return 0; } /* is there a vaild arch? */ - if ((r2 = strchr(r, '-')) != 0 && r[1] && (archid = str2archid(pool, r + 1)) != 0) + if ((r2 = strrchr(r, '-')) != 0 && r[1] && (archid = str2archid(pool, r + 1)) != 0) { *r2 = 0; /* split off */ selection_filter_rel(pool, selection, REL_ARCH, archid); -- cgit v1.2.3