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/SFUtil.cpp b/SFUtil.cpp
--- a/SFUtil.cpp
+++ b/SFUtil.cpp
FilePos.i32[0] = ::SetFilePointer(hFile, FilePos.i32[0], &FilePos.i32[1], dwMoveMethod);
- if (FilePos.i32[0] == INVALID_SET_FILE_POINTER) {
+ if (FilePos.ui32[0] == INVALID_SET_FILE_POINTER) {
if (::GetLastError() != NO_ERROR)
return -1;
}
const char *strcr = strchr(strline,'\r');
const char *strlf = strchr(strline,'\n');
if (strcr==0 && strlf==0) return 0;
- const char *streol;
+ const char *streol = strlf;
if (strcr!=0 && (strcr<strlf || strlf==0)) streol = strcr;
if (strlf!=0 && (strlf<strcr || strcr==0)) streol = strlf;
do {
diff --git a/SFmpqapi.cpp b/SFmpqapi.cpp
--- a/SFmpqapi.cpp
+++ b/SFmpqapi.cpp
DWORD 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;
@@ -3404,7 +3404,7 @@ DWORD DetectFileSeedEx(MPQARCHIVE * mpqOpenArc, HASHTABLEENTRY * lpHashEntry, LP
else {
HANDLE hlFile,hMPQ=(HANDLE)mpqOpenArc;
DWORD fsz;
- char *listbuffer;
+ char *listbuffer = 0;
LCID lcOldLocale = LocaleID;
for (DWORD lcn=0;lcn<nLocales;lcn++) {
LocaleID = availLocales[lcn];
@@ -3427,7 +3427,7 @@ DWORD DetectFileSeedEx(MPQARCHIVE * mpqOpenArc, HASHTABLEENTRY * lpHashEntry, LP
}
SFileCloseFile(hlFile);
if (listbuffer!=0) {
- char *listline;
+ char *listline = 0;
for (listline=listbuffer;listline!=0;listline=nextline(listline)) {
if (listline[0]==0) break;
DWORD lnlen=strlnlen(listline);
|