mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-14 21:56:41 +01:00
29 lines
782 B
Diff
29 lines
782 B
Diff
|
# Description: Handle more than 256 characters in the history
|
||
|
# Author: <bdefreese@bddebian3.bddebian.com>
|
||
|
|
||
|
Index: gmrun-0.9.2/src/history.cc
|
||
|
===================================================================
|
||
|
--- gmrun-0.9.2.orig/src/history.cc 2010-02-03 12:32:18.519767950 +0800
|
||
|
+++ gmrun-0.9.2/src/history.cc 2010-02-03 12:32:43.586035039 +0800
|
||
|
@@ -41,15 +41,14 @@
|
||
|
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();
|