X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fio%2Fserial.cpp;h=ac4f2b764d8666332de5cf932e62e66cd5d764b2;hp=5d335b6faa82e0226c043d14ba3a158e8a84d8ae;hb=82d74297d5b469b0a506d7010a84ab5115cd88ee;hpb=2749f89e25c9b1bfb76803ee01b780790cd3f96a diff --git a/source/io/serial.cpp b/source/io/serial.cpp index 5d335b6..ac4f2b7 100644 --- a/source/io/serial.cpp +++ b/source/io/serial.cpp @@ -292,7 +292,11 @@ unsigned Serial::do_read(char *buf, unsigned size) if(size==0) return 0; - return reader.read(buf, size); + unsigned ret = reader.read(buf, size); + if(ret==0) + set_eof(); + + return ret; } } // namespace IO