[Scummvm-devel] simon1 windows - 64 bit segfault
Mark Weaver
mark-clist at npsl.co.uk
Sun Aug 19 23:48:37 CEST 2007
The attached patch fixes a segfault on x86_64 on entering the room with
the blacksmith (from start, out of cottage, right) in Simon the Sorcerer
1 (CD/Windows/English).
Basically x is negative there, so cast to a uint this is a large value.
On ia32 when added to getBackground() this will overflow and become a
valid pointer again (I believe, not tested), on x86_64 it does not
overflow and so segfaults when dereferencing the pointer. I have fixed
this simply by using a signed int for xoffs/yoffs, which promotes correctly.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: draw.patch
Type: text/x-diff
Size: 589 bytes
Desc: not available
URL: <http://lists.scummvm.org/pipermail/scummvm-devel/attachments/20070819/430f45c9/attachment.patch>
More information about the Scummvm-devel
mailing list