diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/file.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/common/file.cpp b/common/file.cpp index 35307d5618..ff666e820a 100644 --- a/common/file.cpp +++ b/common/file.cpp @@ -133,6 +133,8 @@ bool File::open(const char *filename, const char *directory, int mode, byte encb _encbyte = encbyte; int len = strlen(filename); + if (_name != 0) + delete [] _name; _name = new char[len+1]; memcpy(_name, filename, len+1); |