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




index fecddf9..c6d1eac 100644 (file)
@@ -564,7 +564,7 @@ BOOL SFMPQAPI WINAPI SFileOpenFileAsArchive(MPQHANDLE hSourceMPQ, LPCSTR lpFileN
                }
                DWORD dwMpqStart;
                MPQARCHIVE *mpqOpenArc;
-               dwMpqStart = mpqOpenArc->dwMPQStart + mpqArcFile.lpBlockEntry->dwFileOffset;
+               dwMpqStart = mpqArcFile.lpParentArc->dwMPQStart + mpqArcFile.lpBlockEntry->dwFileOffset;
                flen = mpqArcFile.lpBlockEntry->dwFullSize;
                dwMpqStart = FindMpqHeaderAtLocation(hFile,dwMpqStart,flen);
                if (dwMpqStart==0xFFFFFFFF) {
@@ -1124,7 +1124,7 @@ DWORD SFMPQAPI WINAPI SFileGetFileInfo(MPQHANDLE hFile, DWORD dwInfoType)
        return (DWORD)-1;
 }
 
-DWORD SFMPQAPI WINAPI SFileSetFilePointer(MPQHANDLE hFile, long lDistanceToMove, PLONG lplDistanceToMoveHigh, DWORD dwMoveMethod)
+DWORD SFMPQAPI WINAPI SFileSetFilePointer(MPQHANDLE hFile, LONG lDistanceToMove, PLONG lplDistanceToMoveHigh, DWORD dwMoveMethod)
 {
        if (!hFile) {
                SetLastError(ERROR_INVALID_PARAMETER);
@@ -1176,7 +1176,7 @@ BOOL SFMPQAPI WINAPI SFileReadFile(MPQHANDLE hFile,LPVOID lpBuffer,DWORD nNumber
        }
        if (lpOverlapped)
                if (lpOverlapped->Internal || lpOverlapped->InternalHigh || lpOverlapped->Offset || lpOverlapped->OffsetHigh || lpOverlapped->hEvent)
-                       SFileSetFilePointer(hFile,lpOverlapped->Offset,(long *)&lpOverlapped->OffsetHigh,FILE_BEGIN);
+                       SFileSetFilePointer(hFile,lpOverlapped->Offset,(LONG *)&lpOverlapped->OffsetHigh,FILE_BEGIN);
        if (nNumberOfBytesToRead==0) {
                if (lpNumberOfBytesRead) *lpNumberOfBytesRead = 0;
                if (lpOverlapped) lpOverlapped->InternalHigh = 0;