aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Weigt <juw@posteo.de>2026-02-09 15:58:46 +0100
committerJulian Weigt <juw@posteo.de>2026-02-09 16:00:33 +0100
commitb9e76a120c7e1577efd87b1ed7a5bf12e1160409 (patch)
tree05bd5de9bfd3a0f3010aa916075362676ef5b016
parentdb35cd5887e81b0470175537d00a66dc8665793b (diff)
Looks like we had always skipped the last function, whoops.
-rw-r--r--charf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/charf.c b/charf.c
index b017532..1948971 100644
--- a/charf.c
+++ b/charf.c
@@ -160,8 +160,8 @@ int generate_each_charf(VALUETYPE* f, index_t i){
int d=2;
/*number of strings of length d that begin with 1 and end with 0*/
index_t powd = 1UL << d-2;
- while(i-s >= powd-1){
- s += powd-1;
+ while(i-s >= powd){
+ s += powd;
d++;
powd = powd << 1;
}