diff options
Diffstat (limited to 'tensorflow/core/lib/io/inputbuffer.cc')
-rw-r--r-- | tensorflow/core/lib/io/inputbuffer.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tensorflow/core/lib/io/inputbuffer.cc b/tensorflow/core/lib/io/inputbuffer.cc index 55514c0242..722f1da48c 100644 --- a/tensorflow/core/lib/io/inputbuffer.cc +++ b/tensorflow/core/lib/io/inputbuffer.cc @@ -61,7 +61,10 @@ Status InputBuffer::ReadLine(string* result) { // We don't append the '\n' to *result return Status::OK(); } - *result += c; + // We don't append '\r' to *result + if (c != '\r') { + *result += c; + } } if (errors::IsOutOfRange(s) && !result->empty()) { return Status::OK(); |