summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ctrl/control_cmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ctrl/control_cmd.c b/src/ctrl/control_cmd.c
index 1cc8247b..cdec8efb 100644
--- a/src/ctrl/control_cmd.c
+++ b/src/ctrl/control_cmd.c
@@ -289,7 +289,7 @@ struct ctrl_cmd *ctrl_cmd_parse(void *ctx, struct msgb *msg)
}
cmd->type = get_string_value(ctrl_type_vals, tmp);
- if (cmd->type == CTRL_TYPE_UNKNOWN) {
+ if (cmd->type < 0 || cmd->type == CTRL_TYPE_UNKNOWN) {
cmd->type = CTRL_TYPE_ERROR;
cmd->id = "err";
cmd->reply = "Request type unknown";