[haXe] Bugfix proposal: Int/Number deserialization in SWHX AS2 deserializer.

Stefan Thurnherr stefan.thurnherr at gmail.com
Mon Apr 23 15:05:20 CEST 2007


Thanks, Nicolas.

Ian: I was also wondering why the (c == null) check does not do its
job...the AS2 doc for String.charCodeAt() says:

"Returns a 16-bit integer from 0 to 65535 that represents the
character specified by index. If index is not a number from 0 to
string.length - 1, NaN is returned."

 stefan.




On 4/23/07, Nicolas Cannasse <ncannasse at motion-twin.com> wrote:
> > method in haxe-1.12-win/lib/swhx/1,0,5,8/api/actionscript/AS2/swhx. A
> > check for isNaN(c) should be added, otherwise the deserialization
> > while loop runs forever. The check could for instance be added as
> > follows:
>
> Fixed, thanks for reporting.
>
> haXe modifies the String.charCodeAt methods so that out-of-ranges chars
> returns null instead of NaN, but that's not the case for AS2.
>
> Nicolas
>
> --
> haXe - an open source web programming language
> http://haxe.org
>



More information about the Haxe mailing list