about summary refs log tree commit diff stats
path: root/cmds.c
diff options
context:
space:
mode:
authorDaniel <steew0x8@protonmail.com>2021-11-07 00:06:58 +0100
committerDaniel <steew0x8@protonmail.com>2021-11-07 00:06:58 +0100
commit65b783d28ec01e8ed4ee8de0ae3180f6850a5a5b (patch)
tree6f2f10ed496fb26c628ad43496c85437aecca6ba /cmds.c
parent87b3c38991df6587d6ee720ddbfd2f3eb78d926c (diff)
downloadrpncalc-65b783d28ec01e8ed4ee8de0ae3180f6850a5a5b.tar.gz
fix list and error without message
Diffstat (limited to 'cmds.c')
-rw-r--r--cmds.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/cmds.c b/cmds.c
index ec7efa6..07707df 100644
--- a/cmds.c
+++ b/cmds.c
@@ -55,6 +55,7 @@ int search(const void *s1, const void *s2) {
 void init_state(state *s) {
   int numel = sizeof(CMD_LIST)/sizeof(CMD_LIST[0]);
   qsort(&CMD_LIST, numel, sizeof(CMD_LIST[0]), compare);
+  s->numel = numel;
   s->sorted = CMD_LIST;
 }