[PATCH] fix output of "vconcat([])$OUTFORM"

7 views
Skip to first unread message

oldk1331

unread,
Apr 20, 2019, 11:56:12 AM4/20/19
to fricas...@googlegroups.com
(1) -> vconcat([])$OUTFORM


   >> System error:
   The index 1 is too large.

The problem is that the code doesn't check for this corner case.

diff --git a/src/interp/i-output.boot b/src/interp/i-output.boot
index 044d6041..d4c5047a 100644
--- a/src/interp/i-output.boot
+++ b/src/interp/i-output.boot
@@ -2034,6 +2034,7 @@
   WIDTH u.1 + aggwidth CDDR u

 vconcatapp(u, x, y, d) ==
+  null rest u => d
   w := vConcatWidth u
   y := y + superspan u.1 + 1
   for a in rest u repeat
@@ -2058,8 +2059,10 @@
   APP('")",x,y,d)

 vConcatSub u ==
+  null rest u => 0
   subspan u.1 + +/[height a for a in CDDR u]
 vConcatSuper u ==
+  null rest u => 0
   superspan u.1
 vConcatWidth u ==
   w := 0

Waldek Hebisch

unread,
Apr 20, 2019, 12:32:02 PM4/20/19
to fricas...@googlegroups.com
oldk1331 wrote:
>
>
> (1) -> vconcat([])$OUTFORM
>
>
> >> System error:
> The index 1 is too large.
>
> The problem is that the code doesn't check for this corner case.

Thanks, please commit.


--
Waldek Hebisch
Reply all
Reply to author
Forward
0 new messages