Console history save fixes

This commit is contained in:
Ronald Reagan
2014-01-30 17:21:35 -08:00
parent c22263c8a1
commit c64d1e855b
+3 -1
View File
@@ -481,6 +481,7 @@ void savehistory() {
loopv(history) {
f->printf("%s\n",history[i]->buf);
}
delete f;
}
void loadhistory() {
@@ -488,9 +489,10 @@ void loadhistory() {
char *line = NULL;
line = strtok(histbuf, "\n");
while (line) {
history.add(new hline)->buf = line;
history.add(new hline)->buf = newstring(line);
line = strtok(NULL, "\n");
}
DELETEA(histbuf);
histpos = history.length();
}