1
0
Fork 0

Copy all fields in copy constructor (wjp and valgrind)

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3775
This commit is contained in:
Peter Veenstra 2012-01-05 12:03:11 +00:00
parent 4907599222
commit 0540ecdca5

View file

@ -97,6 +97,7 @@ DOS_File::DOS_File(const DOS_File& orig) {
attr=orig.attr;
refCtr=orig.refCtr;
open=orig.open;
hdrive=orig.hdrive;
name=0;
if(orig.name) {
name=new char [strlen(orig.name) + 1];strcpy(name,orig.name);
@ -110,6 +111,7 @@ DOS_File & DOS_File::operator= (const DOS_File & orig) {
attr=orig.attr;
refCtr=orig.refCtr;
open=orig.open;
hdrive=orig.hdrive;
if(name) {
delete [] name; name=0;
}