aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/solvers/h48/utils.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/solvers/h48/utils.h b/src/solvers/h48/utils.h
index b266c66..aa2ddde 100644
--- a/src/solvers/h48/utils.h
+++ b/src/solvers/h48/utils.h
@@ -1,3 +1,9 @@
1#if SIZE_MAX == UINT64_MAX
2#define H48_HMAX UINT8_C(11)
3#else
4#define H48_HMAX UINT8_C(7)
5#endif
6
1long long parse_h48_hk( 7long long parse_h48_hk(
2 const char *, uint8_t [static 1], uint8_t [static 1]); 8 const char *, uint8_t [static 1], uint8_t [static 1]);
3STATIC long long dataid_h48(const char *, char [static NISSY_SIZE_DATAID]); 9STATIC long long dataid_h48(const char *, char [static NISSY_SIZE_DATAID]);
@@ -18,8 +24,9 @@ parse_h48_hk(const char *buf, uint8_t h[static 1], uint8_t k[static 1])
18 buf++; 24 buf++;
19 25
20 *h = atoi(buf); 26 *h = atoi(buf);
21 if (*h > 11) { 27 if (*h > H48_HMAX) {
22 LOG("[H48] Invalid value %" PRIu8 " for parameter h\n", *h); 28 LOG("[H48] Invalid value %" PRIu8 " for parameter h (must be "
29 "at most %" PRIu8 ")\n", *h, H48_HMAX);
23 goto parse_h48_hk_error; 30 goto parse_h48_hk_error;
24 } 31 }
25 32

Generated with cgit - Back to sebastiano.tronto.net