Skip to content

Commit

Permalink
πŸ› workaround with larger array
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaudroques committed Dec 21, 2024
1 parent 4c2d1cc commit ddba682
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/gen/lib/dotgen/mincross__c.java
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit ddba682

Please sign in to comment.