Bug : Hexadecimal doesn't return correct value

Hello,

0x89504E47

is positive (2303741511) in as3, negative (-1991225785) in haxe ???
js too return a positive value (2303741511)

Thanks

It depends on how you interpret the value :slight_smile:

https://try.haxe.org/#85d55

how to convert Int to Uint

I tried this

cast(0x89504E47, UInt)

You can just assign it like in the sample:

var value:UInt = 0x89504E47;

It’s the same value in memory, it’s just how we interpret it :slight_smile: