Commit 2b18b44f authored by Guolin Ke's avatar Guolin Ke
Browse files

fix bug for large line in text_reader .

parent 102dc5fd
...@@ -123,7 +123,7 @@ public: ...@@ -123,7 +123,7 @@ public:
} }
} }
if (last_i != read_cnt) { if (last_i != read_cnt) {
last_line_ = std::string(buffer_process + last_i, read_cnt - last_i); last_line_.append(buffer_process + last_i, read_cnt - last_i);
} }
return cnt; return cnt;
}); });
...@@ -260,7 +260,7 @@ public: ...@@ -260,7 +260,7 @@ public:
process_fun(start_idx, lines_); process_fun(start_idx, lines_);
lines_.clear(); lines_.clear();
if (last_i != read_cnt) { if (last_i != read_cnt) {
last_line_ = std::string(buffer_process + last_i, read_cnt - last_i); last_line_.append(buffer_process + last_i, read_cnt - last_i);
} }
return cnt; return cnt;
}); });
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment