gnash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnash] non-portable amf test?


From: Martin Guy
Subject: Re: [Gnash] non-portable amf test?
Date: Tue, 29 May 2007 01:52:58 +0100

2007/5/25, Petter Reinholdtsen <address@hidden>:
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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]