From f5e0dbe78b13916f5ccca29c3cb25235f3bb56e9 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Fri, 21 Jan 2011 02:50:20 -0500 Subject: [PATCH] Patched to compile on Windows. --- src/physfs.c | 4 ++-- src/platform_windows.c | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/physfs.c b/src/physfs.c index e3a9fe16..d1c14555 100644 --- a/src/physfs.c +++ b/src/physfs.c @@ -798,8 +798,8 @@ static const char *find_filename_extension(const char *fname) const char *retval = NULL; if (fname != NULL) { - retval = strchr(fname, '.'); - const char *p = retval; + const char *p = strchr(fname, '.'); + retval = p; while (p != NULL) { diff --git a/src/platform_windows.c b/src/platform_windows.c index 6aa73945..e01f7c89 100644 --- a/src/platform_windows.c +++ b/src/platform_windows.c @@ -971,6 +971,7 @@ void *__PHYSFS_platformOpenAppend(const char *filename) } /* __PHYSFS_platformOpenAppend */ +/* !!! FIXME: this function fails if len > 0xFFFFFFFF. */ PHYSFS_sint64 __PHYSFS_platformRead(void *opaque, void *buf, PHYSFS_uint64 len) { HANDLE Handle = ((WinApiFile *) opaque)->handle; @@ -984,8 +985,9 @@ PHYSFS_sint64 __PHYSFS_platformRead(void *opaque, void *buf, PHYSFS_uint64 len) } /* __PHYSFS_platformRead */ +/* !!! FIXME: this function fails if len > 0xFFFFFFFF. */ PHYSFS_sint64 __PHYSFS_platformWrite(void *opaque, const void *buffer, - PHYSFS_uint32 size, PHYSFS_uint32 count) + PHYSFS_uint64 len) { HANDLE Handle = ((WinApiFile *) opaque)->handle; DWORD CountOfBytesWritten = 0;