aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/solvers/h48/gendata_h48.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/solvers/h48/gendata_h48.h b/src/solvers/h48/gendata_h48.h
index 3979a39..50ab01c 100644
--- a/src/solvers/h48/gendata_h48.h
+++ b/src/solvers/h48/gendata_h48.h
@@ -71,9 +71,15 @@ gendata_h48(gendata_h48_arg_t *arg)
71 71
72 cocsepsize = gendata_cocsep(arg->buf, arg->selfsim, arg->crep); 72 cocsepsize = gendata_cocsep(arg->buf, arg->selfsim, arg->crep);
73 73
74 cocsepdata_offset = (char *)arg->buf + INFOSIZE; 74 if (arg->buf == NULL) {
75 arg->cocsepdata = (uint32_t *)cocsepdata_offset; 75 cocsepdata_offset = NULL;
76 arg->h48buf = (char *)arg->buf + cocsepsize; 76 arg->cocsepdata = NULL;
77 arg->h48buf = NULL;
78 } else {
79 cocsepdata_offset = (char *)arg->buf + INFOSIZE;
80 arg->cocsepdata = (uint32_t *)cocsepdata_offset;
81 arg->h48buf = (char *)arg->buf + cocsepsize;
82 }
77 83
78 arg->base = 99; // TODO: set this somewhere else 84 arg->base = 99; // TODO: set this somewhere else
79 85
@@ -683,6 +689,7 @@ gendata_h48_derive(uint8_t h, const void *fulltable, void *buf)
683 689
684 /* Initializing values in case of error */ 690 /* Initializing values in case of error */
685 /* TODO cleanup this */ 691 /* TODO cleanup this */
692 fulltableinfo.h48h = 11;
686 fulltableinfo.bits = 2; 693 fulltableinfo.bits = 2;
687 fulltableinfo.base = 8; 694 fulltableinfo.base = 8;
688 695

Generated with cgit - Back to sebastiano.tronto.net