From fcc581fba96d7d9f955a3dafc531e072d4d2e04f Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Tue, 25 Jan 2022 21:32:58 +0000 Subject: [PATCH] Add static assert that number of commands does not exceed limit --- src/command_type.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/command_type.h b/src/command_type.h index 1bc924b428..f02980a101 100644 --- a/src/command_type.h +++ b/src/command_type.h @@ -513,6 +513,8 @@ enum FlaggedCommands { CMD_ID_MASK = 0x00FF, ///< mask for the command ID }; +static_assert(CMD_END <= CMD_ID_MASK + 1); + /** * Command flags for the command table _command_proc_table. *