Classic: on x86 GCC asm builds, fix crash with floor sprites of (x or y) size 2.

The idiv instruction also signals an FPE when the resulting *signed* quotient
overflows, so we simply use div instead.

git-svn-id: https://svn.eduke32.com/eduke32@2850 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2012-07-29 12:46:56 +00:00
parent 0e6c83bb1b
commit 109457994e

View file

@ -3938,7 +3938,7 @@ static void transmaskwallscan(int32_t x1, int32_t x2)
// from pragmas.h
# define ourdivscale32(d,b) \
({ int32_t __d=(d), __b=(b), __r; \
__asm__ __volatile__ ("xorl %%eax, %%eax; idivl %%ebx" \
__asm__ __volatile__ ("xorl %%eax, %%eax; divl %%ebx" \
: "=a" (__r), "=d" (__d) : "d" (__d), "b" (__b) : "cc"); \
__r; })
#else