From 8dda2d7cbe30d786ca67015290de6bb112e8ebb4 Mon Sep 17 00:00:00 2001 From: Erwin Janssen Date: Sat, 7 Jan 2017 19:19:40 +0100 Subject: [PATCH] Fix incorrect assignment in gvCloneGVC function The function `gvCloneGVC` creates a new `GVC_t` object and copies the values from gvc0 to gvc. In the last assignment, gvc->packages is given the value of itself: gvc->pckages. This should be gvc0 instead. --- lib/gvc/gvcontext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/gvc/gvcontext.c b/lib/gvc/gvcontext.c index 4ad388b45..73ca5a71c 100644 --- a/lib/gvc/gvcontext.c +++ b/lib/gvc/gvcontext.c @@ -117,7 +117,7 @@ GVC_t* gvCloneGVC (GVC_t * gvc0) gvc->common = gvc0->common; memcpy (&gvc->apis, &gvc0->apis, sizeof(gvc->apis)); memcpy (&gvc->api, &gvc0->api, sizeof(gvc->api)); - gvc->packages = gvc->packages; + gvc->packages = gvc0->packages; return gvc; } -- 2.40.0