Revert "Fix read_string_generic to only use expected_len when expected_len == 0"

This reverts commit 9b748bdb2e.
pull/1330/head
Mike Black W9MDB 2023-05-27 15:11:40 -05:00
rodzic 1f95e06cc1
commit 08abfbe19a
1 zmienionych plików z 0 dodań i 1 usunięć

Wyświetl plik

@ -1336,7 +1336,6 @@ 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;