Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix error when float/double numbers are passed #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

fix error when float/double numbers are passed #24

wants to merge 1 commit into from

Conversation

RaptorX
Copy link

@RaptorX RaptorX commented Oct 26, 2020

hlConfig := {showInfo : chrome.Jxon_True()
,contentColor : {r:0, g:100, b:0, a:0.5}} <-- float parameter for alpha channel

when sending information as shown above Jxon_Dump passes "0.5" instead of unquoted value.
That's because float/doubles in autohotkey have a string buffer attached to them, and tricks your function in to not sending the parameter as is.

hlConfig := {showInfo     : chrome.Jxon_True()
                   ,contentColor : {r:0, g:100, b:0, a:0.5}} <-- float parameter for alpha channel

when sending information as shown above Jxon_Dump passes "0.5" instead of unquoted value.
That's because float/doubles in autohotkey have a string buffer attached to them, and tricks your function in to not sending the parameter as is.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant