From ddba6823985a886cb448535afabaa863c8bed58c Mon Sep 17 00:00:00 2001 From: Arnaud Roques Date: Sat, 21 Dec 2024 11:12:32 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20workaround=20with=20larger=20arr?= =?UTF-8?q?ay=20https://github.com/plantuml/plantuml/issues/2006?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/gen/lib/dotgen/mincross__c.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gen/lib/dotgen/mincross__c.java b/src/gen/lib/dotgen/mincross__c.java index e9017c8781c..82111feafc7 100644 --- a/src/gen/lib/dotgen/mincross__c.java +++ b/src/gen/lib/dotgen/mincross__c.java @@ -209,7 +209,8 @@ public static ST_adjmatrix_t new_matrix(int i, int j) { // Arnaud 15/09/2022: the j+1 is needed in some case to avoid ArrayIndexOutOfBoundsException // Arnaud 02/03/2023: the j+3 is needed in some case to avoid ArrayIndexOutOfBoundsException // Arnaud 15/03/2023: the i+3 is needed in some case to avoid ArrayIndexOutOfBoundsException when LR direction - rv.data = new int[i+3][j+3]; // Or maybe new int[j][i] ? + // Arnaud 20/12/2024: Even bigger + rv.data = new int[Math.max(i, j) + 8][Math.max(i, j) + 8]; return rv; } finally { LEAVING("756bre1tpxb1tq68p7xhkrxkc","new_matrix");