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 [Wed, 16 Jan 2013 08:24:55 +0000 (01:24 -0700)]
SFmpqapi.cpp

index 56cca21..4e87aef 100644 (file)
@@ -3137,6 +3137,8 @@ MPQHANDLE GetFreeHashTableEntry(MPQHANDLE hMPQ, LPCSTR lpFileName, LCID FileLoca
                }
                i = (i + 1) % mpqOpenArc->MpqHeader.dwHashTableSize;
        } while (i!=dwTablePos);
+       if (nFirstFree != 0xFFFFFFFF)
+               return (MPQHANDLE)&mpqOpenArc->lpHashTable[nFirstFree];
        SetLastError(MPQ_ERROR_HASH_TABLE_FULL);
        return 0;
 }