]> granicus.if.org Git - graphviz/commitdiff
Fix bug with listing of available plugins when last plugin of previous type was in...
authorellson <devnull@localhost>
Thu, 24 May 2007 14:33:59 +0000 (14:33 +0000)
committerellson <devnull@localhost>
Thu, 24 May 2007 14:33:59 +0000 (14:33 +0000)
library as the first plugin of a new type.   Would cause some plugins to be unlisted.

lib/gvc/gvplugin.c

index eb9e78036cf2a84d37270f779638b815c1ba255d..6c34acdca5a160e769751bf6e427088003a35292 100644 (file)
@@ -310,8 +310,10 @@ const char *gvplugin_list(GVC_t * gvc, api_t api, char *str)
        pprev = NULL;
        while (*pnext) {
            /* list only the matching type, and only once*/
-           if ((strcasecmp(s, (*pnext)->typestr) == 0)
-                   && ! (pprev && strcasecmp((*pnext)->packagename, (*pprev)->packagename) == 0)) {
+           if (strcasecmp(s, (*pnext)->typestr) == 0
+               && !(pprev
+                   && strcasecmp(s, (*pprev)->typestr) == 0
+                   && strcasecmp((*pprev)->packagename, (*pnext)->packagename) == 0)) {
                /* list each member of the matching type as "type:path" */
                append_buf(' ', (*pnext)->typestr, new);
                buf = append_buf(':', (*pnext)->packagename, FALSE);