From 485a285abea07fa296ee56517cf95b4dbab69e29 Mon Sep 17 00:00:00 2001 From: Aurelien Jacobs Date: Sun, 20 Sep 2015 16:18:18 +0200 Subject: [PATCH] scpi: don't stop parsing table at command 0 which is a valid command command 0 is SCPI_CMD_REMOTE --- src/scpi/helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scpi/helpers.c b/src/scpi/helpers.c index c686390f..4e4796fc 100644 --- a/src/scpi/helpers.c +++ b/src/scpi/helpers.c @@ -55,7 +55,7 @@ SR_PRIV const char *scpi_cmd_get(const struct scpi_command *cmdtable, int comman return NULL; cmd = NULL; - for (i = 0; cmdtable[i].command; i++) { + for (i = 0; cmdtable[i].string; i++) { if (cmdtable[i].command == command) { cmd = cmdtable[i].string; break;