From: Erwin Janssen Date: Sat, 7 Jan 2017 18:19:40 +0000 (+0100) Subject: Fix incorrect assignment in gvCloneGVC function X-Git-Tag: 2.42.0~213^2~2^2~14 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8dda2d7cbe30d786ca67015290de6bb112e8ebb4;p=graphviz 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. --- 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; }