diff options
Diffstat (limited to 'host/lib')
-rw-r--r-- | host/lib/transport/udp_simple.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/host/lib/transport/udp_simple.cpp b/host/lib/transport/udp_simple.cpp index 8b6e5eb2b..43414feaa 100644 --- a/host/lib/transport/udp_simple.cpp +++ b/host/lib/transport/udp_simple.cpp @@ -115,13 +115,10 @@ public: //drain anything in current buffer while (_off < _len){ const char ch = _buf[_off++]; - if (ch == '\r') continue; - if (ch == '\n' and _line.empty()) continue; _line += ch; if (ch == '\n') { - line = _line; - _line.clear(); + line.swap(_line); return line; } } |