From c32cd9d1303d3b982aa8ebd34d2c4323bfc24a33 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Mon, 23 Mar 2009 16:49:30 -0400 Subject: [PATCH 1/4] Updated TODO, branching stable-2.0 --- TODO.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/TODO.txt b/TODO.txt index 9425051b..ee2c9f8c 100644 --- a/TODO.txt +++ b/TODO.txt @@ -40,6 +40,7 @@ Stuff: - Write up a simple HOWTO on embedding physicsfs in another project. - Archivers need abstracted i/o to read from memory or files (archives in archives?) - Probably other stuff. Requests and recommendations are welcome. +- Tag missing releases in revision control. // end of TODO.txt ... From da35dbe4482827a88fe86925cbaa80ef7535356a Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Mon, 23 Mar 2009 16:57:35 -0400 Subject: [PATCH 2/4] Tagging release-1.1.0 From 60366b5b32bd3d32b05d5e58ea568a911bca7d1a Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Mon, 23 Mar 2009 16:57:59 -0400 Subject: [PATCH 3/4] Updated stable TODO.txt ... --- TODO.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/TODO.txt b/TODO.txt index ee2c9f8c..9425051b 100644 --- a/TODO.txt +++ b/TODO.txt @@ -40,7 +40,6 @@ Stuff: - Write up a simple HOWTO on embedding physicsfs in another project. - Archivers need abstracted i/o to read from memory or files (archives in archives?) - Probably other stuff. Requests and recommendations are welcome. -- Tag missing releases in revision control. // end of TODO.txt ... From d7945d5955b1865f5245943a35fe4ca09878bb0e Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Sun, 3 May 2009 01:24:41 -0700 Subject: [PATCH 4/4] Fixed strict-aliasing issue that gcc 4.4 complains about. --- archivers/zip.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/archivers/zip.c b/archivers/zip.c index 92fe2232..255f6f9b 100644 --- a/archivers/zip.c +++ b/archivers/zip.c @@ -375,13 +375,13 @@ static int ZIP_fileClose(fvoid *opaque) static PHYSFS_sint64 zip_find_end_of_central_dir(void *in, PHYSFS_sint64 *len) { PHYSFS_uint8 buf[256]; + PHYSFS_uint8 extra[4]; PHYSFS_sint32 i = 0; PHYSFS_sint64 filelen; PHYSFS_sint64 filepos; PHYSFS_sint32 maxread; PHYSFS_sint32 totalread = 0; int found = 0; - PHYSFS_uint32 extra = 0; filelen = __PHYSFS_platformFileLength(in); BAIL_IF_MACRO(filelen == -1, NULL, 0); /* !!! FIXME: unlocalized string */ @@ -419,7 +419,7 @@ static PHYSFS_sint64 zip_find_end_of_central_dir(void *in, PHYSFS_sint64 *len) { if (__PHYSFS_platformRead(in, buf, maxread - 4, 1) != 1) return(-1); - *((PHYSFS_uint32 *) (&buf[maxread - 4])) = extra; + memcpy(&buf[maxread - 4], &extra, sizeof (extra)); totalread += maxread - 4; } /* if */ else @@ -429,7 +429,7 @@ static PHYSFS_sint64 zip_find_end_of_central_dir(void *in, PHYSFS_sint64 *len) totalread += maxread; } /* else */ - extra = *((PHYSFS_uint32 *) (&buf[0])); + memcpy(&extra, buf, sizeof (extra)); for (i = maxread - 4; i > 0; i--) {