bellard / quickjs

Public repository of the QuickJS Javascript Engine.
https://bellard.org/quickjs
Other
8.01k stars 830 forks source link

bf_atof_internal should check `USE_BF_DEC` macro before using bfdec_normalize_and_round #326

Open laishere opened 1 week ago

laishere commented 1 week ago

When I tried to compile quickjs, I found there's a missing macro check in bf_atof_internal function. https://github.com/bellard/quickjs/blob/36911f0d3ab1a4c190a4d5cbe7c2db225a455389/libbf.c#L3110

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

chqrlie commented 1 week ago

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