diff options
author | (no author) <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10> | 2010-11-11 01:35:28 +0000 |
---|---|---|
committer | (no author) <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10> | 2010-11-11 01:35:28 +0000 |
commit | 7d07436d802a6b4ddc10e8ef6969f5da9fff9719 (patch) | |
tree | 07b267c684d31d34b1c5e1923f5c1bc95c39a8c8 /updater/zbin/minizip/ioapi_mem.c | |
parent | 9144326f77433c88f15e6a361fe89ac7e768f2e9 (diff) |
Fixed x64 version
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@557 4f64403b-2f21-0410-a795-97e2b3489a10
Diffstat (limited to 'updater/zbin/minizip/ioapi_mem.c')
-rw-r--r-- | updater/zbin/minizip/ioapi_mem.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/updater/zbin/minizip/ioapi_mem.c b/updater/zbin/minizip/ioapi_mem.c index 6ac1d16..6c0bf3c 100644 --- a/updater/zbin/minizip/ioapi_mem.c +++ b/updater/zbin/minizip/ioapi_mem.c @@ -77,7 +77,7 @@ voidpf ZCALLBACK fopen_mem_func (opaque, filename, mode) int mode; { ourmemory_t *mem = malloc(sizeof(*mem)); - if (mem==NULL) + if (mem == NULL) return NULL; /* Can't allocate space, so failed */ /* Filenames are specified in the form : @@ -86,13 +86,17 @@ voidpf ZCALLBACK fopen_mem_func (opaque, filename, mode) * size of an int and therefore may need addressing for 64bit * architectures */ - if (sscanf(filename,"%p+%x",&mem->base,&mem->size)!=2) +#ifdef _WIN64 + if (sscanf(filename,"%p+%I64x", &mem->base, &mem->size) != 2) return NULL; - +#else + if (sscanf(filename,"%p+%x", &mem->base, &mem->size) != 2) + return NULL; +#endif if (mode & ZLIB_FILEFUNC_MODE_CREATE) - mem->limit=0; /* When writing we start with 0 bytes written */ + mem->limit = 0; /* When writing we start with 0 bytes written */ else - mem->limit=mem->size; + mem->limit = mem->size; mem->cur_offset = 0; |