1
0
Fork 0

Add patch 3011706 by bredbored: remove double weirdness with free and dirsearch being 0. More sensible clearing of the directory cache. Fixes skynet crashes related to corrupted drive cache.

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3630
This commit is contained in:
Peter Veenstra 2010-08-07 18:25:24 +00:00
parent 8f4d5fce90
commit 0438430b24
2 changed files with 58 additions and 16 deletions

View file

@ -156,8 +156,9 @@ public:
public:
CFileInfo(void) {
orgname[0] = shortname[0] = 0;
nextEntry = shortNr = 0;
isDir = false;
id = MAX_OPENDIRS;
nextEntry = shortNr = 0;
}
~CFileInfo(void) {
for (Bit32u i=0; i<fileList.size(); i++) delete fileList[i];
@ -167,6 +168,7 @@ public:
char orgname [CROSS_LEN];
char shortname [DOS_NAMELENGTH_ASCII];
bool isDir;
Bit16u id;
Bitu nextEntry;
Bitu shortNr;
// contents
@ -175,6 +177,8 @@ public:
};
private:
void ClearFileInfo(CFileInfo *dir);
void DeleteFileInfo(CFileInfo *dir);
bool RemoveTrailingDot (char* shortname);
Bits GetLongName (CFileInfo* info, char* shortname);
@ -203,7 +207,6 @@ private:
Bit16u srchNr;
CFileInfo* dirSearch [MAX_OPENDIRS];
char dirSearchName [MAX_OPENDIRS];
bool free [MAX_OPENDIRS];
CFileInfo* dirFindFirst [MAX_OPENDIRS];
Bit16u nextFreeFindFirst;