diff options
Diffstat (limited to 'host/lib/usrp/x300')
-rw-r--r-- | host/lib/usrp/x300/x300_fw_uart.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/host/lib/usrp/x300/x300_fw_uart.cpp b/host/lib/usrp/x300/x300_fw_uart.cpp index b0fae124d..86141ca9a 100644 --- a/host/lib/usrp/x300/x300_fw_uart.cpp +++ b/host/lib/usrp/x300/x300_fw_uart.cpp @@ -132,6 +132,10 @@ struct x300_uart_iface : uart_iface if (ch == '\r') continue; + // avoid returning empty strings + if (ch == '\n' and _rxbuff.empty()) + continue; + // store character to buffer _rxbuff += std::string(1, (char)ch); |