]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
Oops, scale int64 count into int32 count for swapper.
authorJim Thoenen <the.resident@gmail.com>
Sun, 2 Feb 2014 07:52:50 +0000 (01:52 -0600)
committerJim Thoenen <the.resident@gmail.com>
Sun, 2 Feb 2014 07:52:50 +0000 (01:52 -0600)
util.c

diff --git a/util.c b/util.c
index bcffdcbf9fa43df7be0bb4925f33240a065e1ad1..ba7db5ff510a496e2fefe71976cc9bcc147f0803 100644 (file)
--- a/util.c
+++ b/util.c
@@ -117,7 +117,7 @@ void util_tolittleendianarray(void *_data, size_t length, unsigned int typesize)
                 util_swap32((uint32_t*)_data, length);
                 return;
             case 8:
-                util_swap64((uint32_t*)_data, length);
+                util_swap64((uint32_t*)_data, length<<1); /* swap64 operates on 32 bit words, thus scale to that length. */
                 return;
 
             default: