Hello,
I have a strange behavoir using an ANE in C++
int numBytes = sizeof(int);
int value = 2024 ;
char* bytes = (char*)malloc(numBytes);
memcpy( bytes, &value, numBytes );
in as3 :
trace( bytes.readByte(), bytes.readByte(), bytes.readByte(), bytes.readByte() );
return
but
var bytes:ByteArray = new ByteArray();
bytes.writeInt(2024);
bytes.position = 0;
trace( bytes.readByte(), bytes.readByte(), bytes.readByte(), bytes.readByte() );
return
It's the reverse and ByteArray.readInt()
return a bad value.
(I need to reverse the char*
)
I have the same behavior in Objective-C and in C#