Improve history robustness against corrupt files

Fixes #1581
This commit is contained in:
ridiculousfish
2014-07-29 14:41:21 -07:00
parent b6658c5497
commit 52ae5f885e
6 changed files with 85 additions and 45 deletions

View File

@@ -3583,7 +3583,7 @@ static int builtin_history(parser_t &parser, wchar_t **argv)
if (argc == 1)
{
wcstring full_history;
history->get_string_representation(full_history, wcstring(L"\n"));
history->get_string_representation(&full_history, wcstring(L"\n"));
stdout_buffer.append(full_history);
stdout_buffer.push_back('\n');
return STATUS_BUILTIN_OK;