fix odd situation where searchslot overrunning was not detected (see sf bug #1543663)
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2691
This commit is contained in:
parent
be9a70adfd
commit
85603ac5eb
1 changed files with 4 additions and 2 deletions
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: drive_cache.cpp,v 1.47 2006-04-10 12:52:47 qbix79 Exp $ */
|
||||
/* $Id: drive_cache.cpp,v 1.48 2006-08-23 20:09:52 c2woody Exp $ */
|
||||
|
||||
#include "drives.h"
|
||||
#include "dos_inc.h"
|
||||
|
@ -690,11 +690,13 @@ bool DOS_Drive_Cache::SetResult(CFileInfo* dir, char* &result, Bit16u entryNr)
|
|||
bool DOS_Drive_Cache::FindFirst(char* path, Bitu& id)
|
||||
{
|
||||
Bit16u dirID;
|
||||
Bitu dirFindFirstID = this->nextFreeFindFirst++; //increase it for the next search
|
||||
Bitu dirFindFirstID = this->nextFreeFindFirst;
|
||||
|
||||
// Cache directory in
|
||||
if (!OpenDir(path,dirID)) return false;
|
||||
|
||||
this->nextFreeFindFirst++; //increase it for the next search
|
||||
|
||||
if (dirFindFirstID == MAX_OPENDIRS) {
|
||||
// no free slot found...
|
||||
LOG(LOG_MISC,LOG_ERROR)("DIRCACHE: FindFirst/Next: All slots full. Resetting");
|
||||
|
|
Loading…
Add table
Reference in a new issue