From 2eda4bf1a72116f07e8aab4032264d7dd755cdbf Mon Sep 17 00:00:00 2001 From: Michael Black W9MDB Date: Mon, 18 Jan 2021 17:49:05 -0600 Subject: [PATCH] Use only 1st 2 chars for newcat_set_command_validate check --- rigs/yaesu/newcat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rigs/yaesu/newcat.c b/rigs/yaesu/newcat.c index 2e176d36e..b4e6e9c46 100644 --- a/rigs/yaesu/newcat.c +++ b/rigs/yaesu/newcat.c @@ -9654,8 +9654,8 @@ int newcat_set_cmd_validate(RIG *rig) if (bytes > 0) { - // if they match we are validated - if (strcmp(priv->cmd_str, priv->ret_data) == 0) { RETURNFUNC(RIG_OK); } + // if the first two chars match we are validated + if (strncmp(priv->cmd_str, priv->ret_data, 2) == 0) { RETURNFUNC(RIG_OK); } else { rc = -RIG_EPROTO; } }