diff options
Diffstat (limited to 'src/history.cc')
-rw-r--r-- | src/history.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/history.cc b/src/history.cc index 61afba0..33d946c 100644 --- a/src/history.cc +++ b/src/history.cc @@ -41,15 +41,14 @@ HistoryFile::read_the_file() ifstream f(filename); if (!f) return; + string line_text; + while (!f.eof()) { - char line_text[256]; string line_str; - f.getline(line_text, sizeof(line_text)); - if (*line_text) { - line_str = line_text; - history.push_back(line_str); - } + getline(f,line_text); + line_str = line_text; + history.push_back(line_str); } m_file_entries = history.size(); |