Backport bsnes/gambatte patches and make emu at least run
[lsnes.git] / bsnes-patches / v084 / 0005-Fix-unserialization-of-64-bit-signed-integers.patch
blobcf62f434cdc5742f10b264e9aa009b7cafaa04a7
1 From aa1352516e38ff64f304d8831b357841c4795e43 Mon Sep 17 00:00:00 2001
2 From: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
3 Date: Fri, 11 Nov 2011 03:05:48 +0200
4 Subject: [PATCH 05/10] Fix unserialization of 64-bit signed integers
6 ---
7 nall/serializer.hpp | 2 +-
8 1 file changed, 1 insertion(+), 1 deletion(-)
10 diff --git a/nall/serializer.hpp b/nall/serializer.hpp
11 index ff2337a..e6bc8fa 100755
12 --- a/nall/serializer.hpp
13 +++ b/nall/serializer.hpp
14 @@ -58,7 +58,7 @@ namespace nall {
15 for(unsigned n = 0; n < size; n++) idata[isize++] = value >> (n << 3);
16 } else if(imode == Load) {
17 value = 0;
18 - for(unsigned n = 0; n < size; n++) value |= idata[isize++] << (n << 3);
19 + for(unsigned n = 0; n < size; n++) value |= (unsigned long long)idata[isize++] << (n << 3);
20 } else if(imode == Size) {
21 isize += size;
23 --
24 1.8.4.4