Skip to content

fix: always make an edge label, even when empty

Matthew Fernandez requested to merge smattr/graphviz:smattr/gitlab-2368 into main

Processing certain graphs would result in failures in the spline routing code:

  Error: in routesplines, illegal values of prev 1 and next 1, line 441
  Error: in routesplines, illegal values of prev 1 and next 1, line 441
  Error: lost 376 256 edge
  Error: lost 256 376 edge

Instead of bypassing the label construction code in the case of an edge label being empty, the label is now unconditionally constructed. The label itself should still not appear as it has no content.

It is not clear to me why this change fixes the problem. The change was arrived at by typoing some unrelated development work and observing that the unintended edits surprisingly fixed the #2368 (closed) test case. The test case itself has no empty labels, so one would expect this change to be a no-op for it. But apparently it is not.

Gitlab: #1887, #2436, fixes #2368 (closed)
Reported-by: kayoch1n

Merge request reports