vial: check to ensure VIAL_UNLOCK_COMBO_ROWS and VIAL_UNLOCK_COMBO_COLS

contain the same number of elements
This commit is contained in:
Ilya Zhuravlev 2021-01-12 11:18:11 -05:00
parent 3bbc4c1b43
commit 0df86e79b4

View File

@ -41,6 +41,7 @@ static uint8_t vial_unlock_combo_rows[] = VIAL_UNLOCK_COMBO_ROWS;
static uint8_t vial_unlock_combo_cols[] = VIAL_UNLOCK_COMBO_COLS;
#define VIAL_UNLOCK_NUM_KEYS (sizeof(vial_unlock_combo_rows)/sizeof(vial_unlock_combo_rows[0]))
_Static_assert(VIAL_UNLOCK_NUM_KEYS < 15, "Max 15 unlock keys");
_Static_assert(sizeof(vial_unlock_combo_rows) == sizeof(vial_unlock_combo_cols), "The number of unlock cols and rows should be the same");
#endif
#define VIAL_RAW_EPSIZE 32