easycomm: Return the correct value of pointer val

Add value of ackbuf into value of val instead of
the address, because isn't the same after the call
of function easycomm_rot_get_conf().

Signed-off-by: Agis Zisimatos <agzisim@gmail.com>
pull/120/head
Agis Zisimatos 2019-07-16 23:32:29 +03:00
rodzic 5b5e39d86f
commit 4b6fb8f869
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -314,8 +314,8 @@ static int easycomm_rot_get_conf(ROT *rot, token_t token, char *val) {
rig_debug(RIG_DEBUG_TRACE, "%s got response: %s\n", __FUNCTION__, ackbuf);
/* Return given string at correct position*/
val = &ackbuf[2]; /* CCxxxxxx */
/* Return given string at correct position*/
memcpy(val, ackbuf + 2, sizeof(ackbuf) - 2); /* CCxxxxxx */
return RIG_OK;
}