diff --git a/kenwood/kenwood.c b/kenwood/kenwood.c index d2b7c70e8..ef0eda572 100644 --- a/kenwood/kenwood.c +++ b/kenwood/kenwood.c @@ -251,8 +251,6 @@ transaction_write: goto transaction_write; goto transaction_quit; } - else - *datasize = retval; /* Check that command termination is correct */ if (strchr(cmdtrm, data[strlen(data)-1])==NULL) { @@ -294,6 +292,11 @@ transaction_write: } } + *datasize = retval; /* this is retval from successful + read_string above, don't assign + until here because IN value is + needed for retries */ + /* always give back a null terminated string without * the command terminator. */