Shell: Don't crash if history file does not exist :D

This commit is contained in:
Bananymous 2024-10-16 00:41:28 +03:00
parent 41e2b898ab
commit 91381546d5
1 changed files with 2 additions and 1 deletions

View File

@ -707,7 +707,7 @@ Input::Input()
FILE* history_fp = fopen(s_history_path.data(), "r");
if (history_fp == nullptr)
return;
goto history_initialized;
char buffer[128];
BAN::String current_line;
@ -733,6 +733,7 @@ Input::Input()
s_history.remove(0);
}
}
history_initialized:
m_buffers = s_history;
MUST(m_buffers.emplace_back(""_sv));