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

Failure to parse number #153

Closed
Yogpod opened this issue May 31, 2023 · 5 comments
Closed

Failure to parse number #153

Yogpod opened this issue May 31, 2023 · 5 comments

Comments

@Yogpod
Copy link

Yogpod commented May 31, 2023

The code print(0x1.4911360AE2a88p-2)
Fails with glualint
WindowsTerminal_VKy2lTafBb

But prints in gmod
gmod_acgvzwWu5L

Numbers like 0x0.0fp-2 also fail so I think it's an issue with the letters on the right side of the decimal in hex numbers

@FPtje
Copy link
Owner

FPtje commented May 31, 2023

Thanks for reporting this bug! So apparently a hexadecimal at the decimal point just means <hex number> / 16, so 0x0.1 is 0.0625, 0x0.2 is 0.125 and so forth. The p is something else that also works for normal numbers.

I'll fix it. In the meantime, may I ask what the use case of those numbers is? I can imagine it's incredibly hard to read floating decimals. What do you use them for?

@FPtje
Copy link
Owner

FPtje commented May 31, 2023

Fixed in b3d6a0b

@FPtje FPtje closed this as completed May 31, 2023
@Yogpod
Copy link
Author

Yogpod commented May 31, 2023

It was causing an error to show in obfuscated lua files, so I guess that's a use case

@FPtje
Copy link
Owner

FPtje commented May 31, 2023

That's not the first time obfuscated Lua files cause bug reports to glualint. I guess obfuscation is useful after all.

@FPtje
Copy link
Owner

FPtje commented May 31, 2023

Fixed in https://github.com/FPtje/GLuaFixer/releases/tag/1.24.6!

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

No branches or pull requests

2 participants