The number test was failing on my amd64 machine. This seems to fix the test on
my amd64 ubuntu machine. Unsigned long on 64 bit machine is 8 bytes which is
contrary to the documentation about this byte swap.

Disclaimer, I haven't touched c++ for 10+ years, so this may not be optimal.


--bruce

Index: amf.cpp
===================================================================
RCS file: /sources/gnash/gnash/libamf/amf.cpp,v
retrieving revision 1.28
diff -r1.28 amf.cpp
126c126
<     unsigned long       l;
---
>     uint32_t          l;
143,145c143,145
<           l = *(unsigned long *)x;
<           *(unsigned long *)x = *((unsigned long *)x + 1);
<           *((unsigned long *)x + 1) = l;
---
>           l = *(uint32_t *)x;
>           *(uint32_t *)x = *((uint32_t *)x + 1);
>           *((uint32_t *)x + 1) = l;
147c147
<           swapBytes((char *)((unsigned long *)x+1), 4);
---
>           swapBytes((char *)((uint32_t *)x+1), 4);





_______________________________________________
Gnash-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnash-dev

Reply via email to