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 Small banner for links to this site: |
diff --git a/SFmpqapi.cpp b/SFmpqapi.cpp
--- a/SFmpqapi.cpp
+++ b/SFmpqapi.cpp
@@ -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;
}
|