Skip to content

Commit fc13912

Browse files
authored
Merge pull request #3827 from smoe/caterp_fixes
canterp: closing file upon close command
2 parents 5cfe46b + bfe45b2 commit fc13912

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/emc/canterp/canterp.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -703,6 +703,10 @@ int Canterp::open(const char *newfilename) {
703703
}
704704

705705
int Canterp::close() {
706+
if (f) {
707+
fclose(f);
708+
f = (FILE*) nullptr;
709+
}
706710
return INTERP_OK;
707711
}
708712

0 commit comments

Comments
 (0)