Page 1 of 1

[FIXED] HextoDec returns wrong value

Posted: 29 Mar 2014 11:11
by bdeshi
are the hextodec() values problematic, or am I missing something?

For example, Here's a comparison of XYplorer and Javascript results. Any other mothod should give values consistent with js.
hextodec_borked
Xy seems to go awry with the results if there are 0's in the start of the standard hex value, even if they are skipped.

Re: HextoDec returns wrong value

Posted: 29 Mar 2014 11:16
by bdeshi
this error in hextodec() should be more apparent since XYplorer itself uses the correct conversion when saving color settings as decimal values. :veryconfused:

Re: HextoDec returns wrong value

Posted: 29 Mar 2014 11:31
by PeterH
XY trims leading 0, and if 4 digits it interprets the value as 2 byte - resulting to negative value.

I don't think this is intended. (At least not, if leading 0 are existant.)

Re: HextoDec returns wrong value

Posted: 29 Mar 2014 11:57
by admin
Agreed. I will change this.

Re: HextoDec returns wrong value

Posted: 29 Mar 2014 13:03
by bdeshi
And the fix is coming in 3.. 2...

Re: HextoDec returns wrong value

Posted: 29 Mar 2014 13:26
by admin
1... 0!

Re: HextoDec returns wrong value

Posted: 29 Mar 2014 13:48
by bdeshi
:appl: :appl: :shock: :appl: :appl: