Skip to content

Commit 5f7be9f

Browse files
committed
Always generate tables for current (blocks,teeth) config
1 parent fde1dfc commit 5f7be9f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/precompute_ecmult_gen.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ int main(int argc, char **argv) {
5353
const char outfile[] = "src/precomputed_ecmult_gen.c";
5454
FILE* fp;
5555
size_t config;
56+
int did_current_config = 0;
5657

5758
(void)argc;
5859
(void)argv;
@@ -77,6 +78,12 @@ int main(int argc, char **argv) {
7778
fprintf(fp, "#if 0\n");
7879
for (config = 0; config < sizeof(CONFIGS) / sizeof(*CONFIGS); ++config) {
7980
print_table(fp, CONFIGS[config][0], CONFIGS[config][1]);
81+
if (CONFIGS[config][0] == COMB_BLOCKS && CONFIGS[config][1] == COMB_TEETH) {
82+
did_current_config = 1;
83+
}
84+
}
85+
if (!did_current_config) {
86+
print_table(fp, COMB_BLOCKS, COMB_TEETH);
8087
}
8188
fprintf(fp, "#else\n");
8289
fprintf(fp, "# error Configuration mismatch, invalid COMB_* parameters. Try deleting precomputed_ecmult_gen.c before the build.\n");

0 commit comments

Comments
 (0)