kopia lustrzana https://github.com/Hamlib/Hamlib
Fix read_string_generic to only use expected_len when expected_len == 0
00b6e0ecd7 (commitcomment-115297173)
pull/1330/head
rodzic
34f20cc970
commit
9b748bdb2e
|
@ -1336,6 +1336,7 @@ static int read_string_generic(hamlib_port_t *p,
|
|||
memset(rxbuffer, 0, rxmax);
|
||||
|
||||
short timeout_retries = p->timeout_retry;
|
||||
if (expected_len == 0) expected_len = rxmax;
|
||||
while ( total_count < expected_len && total_count < rxmax - 1) // allow 1 byte for end-of-string
|
||||
{
|
||||
ssize_t rd_count = 0;
|
||||
|
|
Ładowanie…
Reference in New Issue