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

bf_atof_internal should check USE_BF_DEC macro before using bfdec_normalize_and_round #326

Open
laishere opened this issue Jun 28, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@laishere
Copy link

When I tried to compile quickjs, I found there's a missing macro check in bf_atof_internal function.

quickjs/libbf.c

Line 3110 in 36911f0

ret = bfdec_normalize_and_round((bfdec_t *)a, prec, flags);

bfdec_normalize_and_round is defined under USE_BF_DEC flag, and bf_atof_internal trys to access it without the same flag.

@chqrlie chqrlie self-assigned this Jun 28, 2024
@chqrlie chqrlie added the bug Something isn't working label Jun 28, 2024
@chqrlie
Copy link
Collaborator

chqrlie commented Jun 28, 2024

Thank you for reporting this. I shall fix this bug shortly.

@HarlonWang
Copy link

I think this issue hasn't been fixed yet. I made a simple fix, I'm not sure if it's the same as your fix. You can take a look #354 for details. @chqrlie

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants