The bug can be triggered by:

    overlabel(3, empty())$OutputForm



diff --git a/src/interp/i-output.boot b/src/interp/i-output.boot
index da808c6c..976fc7f9 100644
--- a/src/interp/i-output.boot
+++ b/src/interp/i-output.boot
@@ -1043,11 +1043,13 @@

 overlabelApp([.,a,b], x, y, d) ==
   d := APP(b, x, y, d) -- the part that is under the label
-  endPoint := x + WIDTH b - 1
+  -- if b is empty, we set the width to 1 to prevent overflow
+  wb := MAX(WIDTH b, 1)
+  endPoint := x + wb - 1
   middle := QUOTIENT(x + endPoint,2)
   h := y + superspan b + 1
   d := APP(a,middle,h + 1,d)
-  apphor(x,x+WIDTH b-1,y+superspan b+1,d,"|")
+  apphor(x, endPoint, y+superspan b+1,d,"|")

 overbarSuper u == 1 + superspan u.1

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to