From: ShadowFlare Date: Wed, 15 Aug 2012 07:41:06 +0000 (-0600) Subject: Merge branch 'master' into large_archive X-Git-Url: https://sfsrealm.hopto.org/projects/?a=commitdiff_plain;h=77e7421c6e02965a51984e0bca976e2af10647be;p=SFmpqapi.git Merge branch 'master' into large_archive --- 77e7421c6e02965a51984e0bca976e2af10647be diff --cc SFmpqapi.cpp index 863042e,faf2701..e527cda --- a/SFmpqapi.cpp +++ b/SFmpqapi.cpp @@@ -2555,10 -2575,10 +2557,10 @@@ BOOL SFMPQAPI WINAPI MpqCompactArchive( char *lpFileName = (char *)NewAlloc.Alloc(strlen(mpqOpenArc->lpFileName)+13); sprintf(lpFileName,"%s.compact",mpqOpenArc->lpFileName); HANDLE hFile = CreateFile(lpFileName,GENERIC_READ|GENERIC_WRITE,0,0,CREATE_NEW,0,0); - DWORD i; + UInt64 i; if (hFile==INVALID_HANDLE_VALUE) { for (i=0;i<10000;i++) { - sprintf(lpFileName,"%s.compact.%04ld",mpqOpenArc->lpFileName,i); + sprintf(lpFileName,"%s.compact.%04d",mpqOpenArc->lpFileName,i); hFile = CreateFile(lpFileName,GENERIC_READ|GENERIC_WRITE,0,0,CREATE_NEW,0,0); if (hFile!=INVALID_HANDLE_VALUE) break;