From 33815f49e634ba8dcbb4220b7c1ffb00e8c355b9 Mon Sep 17 00:00:00 2001 From: bambooleafz <99185509+bambooleafz@users.noreply.github.com> Date: Mon, 27 May 2024 19:40:59 +0800 Subject: [PATCH] Update qfunc.c the previous `*qlog2 = utoq(log2)` may be incorrect. under that case, `qlog2` actually points to `_qone_` and causes `_qone_` changed --- qfunc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qfunc.c b/qfunc.c index f62e4a8..bb1d2fe 100644 --- a/qfunc.c +++ b/qfunc.c @@ -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; }