Corrected an error in the extract section setup of the tech file

that allocates and deallocates a single layer mask used by the
tech reader.  Decided to work around the issue just by allocating
it only once and not releasing it---it's just a few bytes.
This commit is contained in:
Tim Edwards 2023-02-22 17:56:45 -05:00
parent be577d4318
commit 33d0d53d34
1 changed files with 3 additions and 4 deletions

View File

@ -55,7 +55,7 @@ ExtStyle *ExtCurStyle = NULL;
ExtKeep *ExtAllStyles = NULL;
/* Mask of all types found in the extract section */
TileTypeBitMask *allExtractTypes;
TileTypeBitMask *allExtractTypes = NULL;
/* Forward declarations */
void extTechFinalStyle();
@ -1025,6 +1025,7 @@ ExtTechInit()
}
ExtAllStyles = NULL;
if (allExtractTypes == NULL)
allExtractTypes = (TileTypeBitMask *)mallocMagic(sizeof(TileTypeBitMask));
TTMaskZero(allExtractTypes);
}
@ -3249,8 +3250,6 @@ ExtTechFinal()
TxPrintf("\n");
break;
}
freeMagic(allExtractTypes);
}