diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2024-11-19 22:40:30 +0100 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2024-11-19 22:40:30 +0100 |
commit | 57abee2c47e2ea090445b8500dc8fe8c33efbf95 (patch) | |
tree | 8090fafde4b430306f9a306a6f8f1d6ccf1c8588 /FICS/variable.c | |
parent | 3b03270d2ca54e96b03acac99ffd9449ec96e8a2 (diff) |
Added static assertion
Diffstat (limited to 'FICS/variable.c')
-rw-r--r-- | FICS/variable.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/FICS/variable.c b/FICS/variable.c index c01e177..f9b0c3a 100644 --- a/FICS/variable.c +++ b/FICS/variable.c @@ -476,6 +476,8 @@ Language(unsigned int i) "Danish" }; + _Static_assert(ARRAY_SIZE(Lang) == 4, "Unexpected array size"); + if (i >= ARRAY_SIZE(Lang)) { warnx("%s: invalid arg %u (too large)", __func__, i); return Lang[0]; |