From: Magnus Jacobsson Date: Sun, 8 Nov 2020 10:01:40 +0000 (+0100) Subject: Fix gml2gv style and width parsing X-Git-Tag: 2.46.0~11^2~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c15f1cf231cfdd3110a8c9650578fc85b08fc249;p=graphviz Fix gml2gv style and width parsing Fixes https://gitlab.com/graphviz/graphviz/-/issues/1869. Also removes 2 -Wtautological-overlap-compare warnings. --- diff --git a/CHANGELOG.md b/CHANGELOG.md index db845ee95..61bbb7715 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -69,6 +69,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - fdp crash #1865 - Graphviz always crash with this simple dot file #167 - Seg fault in dot #1771 +- gml2gv doesn't handle some attributes correctly #1869 ## [2.44.1] - 2020-06-29 diff --git a/cmd/tools/gmlparse.y b/cmd/tools/gmlparse.y index c3e3bde86..ff1f11ed6 100644 --- a/cmd/tools/gmlparse.y +++ b/cmd/tools/gmlparse.y @@ -589,10 +589,10 @@ addNodeGraphics (Agnode_t* np, Dt_t* alist, agxbuf* xb, agxbuf* unk) else if (ap->sort == OUTLINE) { agsafeset (np, "pencolor", ap->u.value, ""); } - else if ((ap->sort == WIDTH) && (ap->sort == OUTLINEWIDTH )) { + else if ((ap->sort == WIDTH) || (ap->sort == OUTLINEWIDTH )) { agsafeset (np, "penwidth", ap->u.value, ""); } - else if ((ap->sort == OUTLINESTYLE) && (ap->sort == OUTLINEWIDTH )) { + else if ((ap->sort == STYLE) || (ap->sort == OUTLINESTYLE )) { agsafeset (np, "style", ap->u.value, ""); } else {