Update qfunc.c

the previous `*qlog2 = utoq(log2)` may be incorrect. under that case, `qlog2` actually points to `_qone_` and causes `_qone_` changed
This commit is contained in:
bambooleafz
2024-05-27 19:40:59 +08:00
committed by GitHub
parent 732279bcc3
commit 33815f49e6

View File

@@ -1953,7 +1953,7 @@ qispowerof2(NUMBER *q, NUMBER **qlog2)
* Set *qlog2 to base 2 logarithm of q, which will be a negative value,
* and return true.
*/
*qlog2 = utoq(log2);
**qlog2 = *utoq(log2);
(*qlog2)->num.sign = !(*qlog2)->num.sign; /* set *qlog2 to -log2 */
return true;
}