From: Michael Schroeder Date: Tue, 13 Nov 2012 17:51:16 +0000 (+0100) Subject: fix rpmdbid handling in repo_unset and repo_set_num X-Git-Tag: BASE-SuSE-Code-12_3-Branch~179 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0b74ce02f046f9d117333276e3d9013328912d51;p=thirdparty%2Flibsolv.git fix rpmdbid handling in repo_unset and repo_set_num --- diff --git a/src/repo.c b/src/repo.c index 39e6ab80..2cc386a6 100644 --- a/src/repo.c +++ b/src/repo.c @@ -1429,7 +1429,7 @@ repo_set_num(Repo *repo, Id p, Id keyname, unsigned long long num) { if (!repo->rpmdbid) repo->rpmdbid = repo_sidedata_create(repo, sizeof(Id)); - repo->rpmdbid[p] = num; + repo->rpmdbid[p - repo->start] = num; return; } } @@ -1635,7 +1635,7 @@ repo_unset(Repo *repo, Id p, Id keyname) return; case RPM_RPMDBID: if (repo->rpmdbid) - repo->rpmdbid[p] = 0; + repo->rpmdbid[p - repo->start] = 0; return; case SOLVABLE_PROVIDES: s->provides = 0;