Fix bad strchr logic in newcat.c

pull/224/head
Michael Black 2020-04-04 17:38:48 -05:00
rodzic ee55fba442
commit 066ee398c9
2 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -6152,7 +6152,7 @@ int newcat_get_cmd(RIG *rig)
/* Check that command termination is correct - alternative is
response is longer that the buffer */
if (!strchr(&cat_term, priv->ret_data[strlen(priv->ret_data) - 1]))
if (cat_term != priv->ret_data[strlen(priv->ret_data) - 1])
{
rig_debug(RIG_DEBUG_ERR, "%s: Command is not correctly terminated '%s'\n",
__func__, priv->ret_data);

Wyświetl plik

@ -50,7 +50,7 @@
typedef char ncboolean;
/* shared function version */
#define NEWCAT_VER "20200306"
#define NEWCAT_VER "20200404"
/* Hopefully large enough for future use, 128 chars plus '\0' */
#define NEWCAT_DATA_LEN 129