]> granicus.if.org Git - graphviz/commitdiff
Allow optional number with last color segment
authorerg <devnull@localhost>
Mon, 19 Jul 2010 20:26:42 +0000 (20:26 +0000)
committererg <devnull@localhost>
Mon, 19 Jul 2010 20:26:42 +0000 (20:26 +0000)
lib/common/emit.c

index c2e6287ed0ad0ae76de2cf944dcc80e0b0d7abc1..d869f5e20bf0964456c5aaca266791ec097b76af 100644 (file)
@@ -1509,6 +1509,9 @@ parseSegs (char* clrs, int nseg)
 
     for (cnum = 0, color = strtok(colors, ":"); color; cnum++, color = strtok(0, ":")) {
        if (cnum == nseg-1) {
+           char* p = strchr (color, ',');
+           if (p)
+               *p = '\0';
            segs[cnum].color = color;
            segs[cnum].t = 1.0;
        }