aboutsummaryrefslogtreecommitdiff
path: root/src/solvers/h48/gendata_h48.h
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2024-12-16 17:27:35 +0100
committerSebastiano Tronto <sebastiano@tronto.net>2024-12-16 17:27:35 +0100
commita21959e7edf523e6660023851f73426d8897783a (patch)
tree82d7bb3fa87493b2aa8c827c122bbe49745773fd /src/solvers/h48/gendata_h48.h
parent99b746a01c11e061c4bd42cf096d27be9507ae21 (diff)
downloadnissy-core-a21959e7edf523e6660023851f73426d8897783a.tar.gz
nissy-core-a21959e7edf523e6660023851f73426d8897783a.zip
Fixed alignment bug
Diffstat (limited to 'src/solvers/h48/gendata_h48.h')
-rw-r--r--src/solvers/h48/gendata_h48.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/solvers/h48/gendata_h48.h b/src/solvers/h48/gendata_h48.h
index ae0b732..fe4b259 100644
--- a/src/solvers/h48/gendata_h48.h
+++ b/src/solvers/h48/gendata_h48.h
@@ -79,6 +79,12 @@ gendata_h48(gendata_h48_arg_t *arg)
79 h48size = INFOSIZE + H48_TABLESIZE(arg->h, arg->k); 79 h48size = INFOSIZE + H48_TABLESIZE(arg->h, arg->k);
80 fallbacksize = arg->k == 2 ? INFOSIZE + H48_TABLESIZE(0, 4) : 0; 80 fallbacksize = arg->k == 2 ? INFOSIZE + H48_TABLESIZE(0, 4) : 0;
81 fallback2size = EOESEP_FULLSIZE; 81 fallback2size = EOESEP_FULLSIZE;
82
83 /* Add padding for 8-bit alignment */
84 h48size = 8 * DIV_ROUND_UP(h48size, 8);
85 fallbacksize = 8 * DIV_ROUND_UP(fallbacksize, 8);
86 fallback2size = 8 * DIV_ROUND_UP(fallback2size, 8);
87
82 size = cocsepsize + h48size + fallbacksize + fallback2size; 88 size = cocsepsize + h48size + fallbacksize + fallback2size;
83 89
84 if (arg->buf == NULL) 90 if (arg->buf == NULL)

Generated with cgit - Back to sebastiano.tronto.net