Current News
Archived News
Search News
Discussion Forum


Old Forum
Install Programs More Downloads...
Troubleshooting
Source Code
Format Specs.
Misc. Information
Non-SF Stuff
Links




ShadowFlare [Thu, 1 Oct 2009 00:36:01 +0000 (18:36 -0600)]
SFmpqapi.cpp

index 3c7d4fa..0579c2c 100644 (file)
@@ -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)
                        {