From 3e07197dfaf0e94c9f3256f740bfb531f19dc7a1 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Mon, 1 Nov 2021 09:26:21 -0400 Subject: [PATCH] Adjusted LAYERS_PER_CONTACT from 3 to 4. This is not a preferred solution; it would be much better to make the value adjustible, but the array of tiles sized to LAYERS_PER_CONTACT is a Region structure, and the routine that frees the Region structures does not have a way to call a routine to take additional measures like free'ing a sub- structure of the Region. A proper solution will require some work. --- VERSION | 2 +- resis/ResMain.c | 2 +- resis/resis.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index 3acdebd0..97630135 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.3.221 +8.3.222 diff --git a/resis/ResMain.c b/resis/ResMain.c index dabf3283..ba47a133 100644 --- a/resis/ResMain.c +++ b/resis/ResMain.c @@ -423,7 +423,7 @@ ResFindNewContactTiles(contacts) } } #ifdef PARANOID - if (contacts->cp_currentcontact > LAYERS_PER_CONTACT) + if (contacts->cp_currentcontact >= LAYERS_PER_CONTACT) { TxError("Error: Not enough space allocated for contact nodes\n"); } diff --git a/resis/resis.h b/resis/resis.h index 0f71fcbd..8b33fd52 100644 --- a/resis/resis.h +++ b/resis/resis.h @@ -9,7 +9,7 @@ #ifndef _RESIS_H #define _RESIS_H -#define LAYERS_PER_CONTACT 3 +#define LAYERS_PER_CONTACT 4 #define TILES_PER_JUNCTION 2 typedef struct contactpoint