aboutsummaryrefslogtreecommitdiff
path: root/scripts/genex_cmds.lua
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/genex_cmds.lua')
-rw-r--r--scripts/genex_cmds.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/genex_cmds.lua b/scripts/genex_cmds.lua
index 969a874535..7fd258a6c3 100644
--- a/scripts/genex_cmds.lua
+++ b/scripts/genex_cmds.lua
@@ -34,15 +34,15 @@ local byte_a = string.byte('a')
local byte_z = string.byte('z')
local cmdidxs = string.format([[
-static cmdidx_T cmdidxs[%u] = {
+static const cmdidx_T cmdidxs[%u] = {
]], byte_z - byte_a + 2)
enumfile:write([[
typedef enum CMD_index {
]])
-defsfile:write([[
-static CommandDefinition cmdnames[] = {
-]])
+defsfile:write(string.format([[
+static CommandDefinition cmdnames[%u] = {
+]], #defs))
for i, cmd in ipairs(defs) do
local enumname = cmd.enum or ('CMD_' .. cmd.command)
firstchar = string.byte(cmd.command)