[prev in list] [next in list] [prev in thread] [next in thread]
List: gnash
Subject: Re: [Gnash] non-portable amf test?
From: "Martin Guy" <martinwguy () yahoo ! it>
Date: 2007-05-29 0:52:58
Message-ID: 56d259a00705281752k4cb1405tbedae32216a02a50 () mail ! gmail ! com
[Download RAW message or body]
2007/5/25, Petter Reinholdtsen <pere@hungry.com>:
> testsuite/libamf.all/test_number.cpp
>
> amfnum_t *num;
>
> num = amf_obj.extractNumber(buf);
> if ((((char *)num)[6] == -16) && (((char *)num)[7] == 0x3f)) {
> runtest.pass("Extracted Number AMF object");
> } else {
> runtest.fail("Extracted Number AMF object");
> }
>
> The test fail on s390, as it would on all architectures with a
> different endianness than the authors machine.
I don't get it. It's checking for 0xf03f (hence the idiotic -16), and
in the AMF stream numbers are 64-bit bigendian. But presumable
extractNumber() converts to native endian. So why does the big-endian
f0 3f test succeed
on little-endian hosts and fail on big-endian ones?
M
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic