Fixes writing auxiliary data for deleted elements to a saved input file (#411)

This commit is contained in:
Lew Rossman
2019-03-08 16:41:12 -05:00
parent d2386707d6
commit e5ec4eecab
3 changed files with 49 additions and 13 deletions

View File

@@ -7,7 +7,7 @@
Authors: see AUTHORS
Copyright: see AUTHORS
License: see LICENSE
Last Updated: 03/05/2019
Last Updated: 03/08/2019
******************************************************************************
*/
@@ -219,6 +219,13 @@ int DLLEXPORT EN_open(EN_Project p, const char *inpFile, const char *rptFile,
// Read input data
ERRCODE(getdata(p));
// Close input file
if (p->parser.InFile != NULL)
{
fclose(p->parser.InFile);
p->parser.InFile = NULL;
}
// Free temporary linked lists used for Patterns & Curves
freeTmplist(p->parser.Patlist);
freeTmplist(p->parser.Curvelist);