From: ShadowFlare Date: Thu, 1 Oct 2009 00:36:01 +0000 (-0600) Subject: Fixed new bug introduced by previous fix to searching for free hash slots. X-Git-Url: https://sfsrealm.hopto.org/projects/gitweb.cgi?a=commitdiff_plain;h=631cb94e7243815e465e454c965b6adcd0153d54;p=SFmpqapi.git Fixed new bug introduced by previous fix to searching for free hash slots. --- diff --git a/SFmpqapi.cpp b/SFmpqapi.cpp index 3c7d4fa..0579c2c 100644 --- a/SFmpqapi.cpp +++ b/SFmpqapi.cpp @@ -3230,7 +3230,7 @@ MPQHANDLE GetFreeHashTableEntry(MPQHANDLE hMPQ, LPCSTR lpFileName, LCID FileLoca DWORD i=dwTablePos, nFirstFree = 0xFFFFFFFF; do { - if ((mpqOpenArc->lpHashTable[i].dwBlockTableIndex&0xFFFFFFFE)==0xFFFFFFFE && nFirstFree == 0xFFFFFFFF) + if ((mpqOpenArc->lpHashTable[i].dwBlockTableIndex&0xFFFFFFFE)==0xFFFFFFFE && (nFirstFree == 0xFFFFFFFF || mpqOpenArc->lpHashTable[i].dwBlockTableIndex == 0xFFFFFFFF)) { if (mpqOpenArc->lpHashTable[i].dwBlockTableIndex == 0xFFFFFFFF) {