From 7d07436d802a6b4ddc10e8ef6969f5da9fff9719 Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10> Date: Thu, 11 Nov 2010 01:35:28 +0000 Subject: Fixed x64 version git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@557 4f64403b-2f21-0410-a795-97e2b3489a10 --- updater/zbin/minizip/ioapi_mem.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'updater/zbin/minizip/ioapi_mem.c') 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; -- cgit v1.2.3