From 37377cfe2c7a46d23e44d0f67606c360008167b2 Mon Sep 17 00:00:00 2001 From: flaviojs Date: Wed, 6 Jul 2011 19:36:18 +0000 Subject: * Merged decode_zip/encode_zip from eapp's grfio to replace our direct use of zlib's uncompress/compress. * Fixed strict-aliasing warning in mapcache's GetFloat. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14888 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/tool/mapcache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/tool/mapcache.c') diff --git a/src/tool/mapcache.c b/src/tool/mapcache.c index deec27c4c..f1a7559f1 100644 --- a/src/tool/mapcache.c +++ b/src/tool/mapcache.c @@ -98,7 +98,7 @@ int32 GetLong(const unsigned char* buf) float GetFloat(const unsigned char* buf) { uint32 val = GetULong(buf); - return *((float*)&val); + return *((float*)(void*)&val); } @@ -171,7 +171,7 @@ void cache_map(char *name, struct map_data *m) len = (unsigned long)m->xs*(unsigned long)m->ys*2; write_buf = (unsigned char *)aMalloc(len); // Compress the cells and get the compressed length - compress(write_buf, &len, m->cells, m->xs*m->ys); + encode_zip(write_buf, &len, m->cells, m->xs*m->ys); // Fill the map header strncpy(info.name, name, MAP_NAME_LENGTH); -- cgit v1.2.3-60-g2f50