Filename saves allow illegal characters resulting in game crash.
This commit is contained in:
Thomas Baumhauer 2008-05-22 09:45:20 +00:00
parent 51728e3d2d
commit ef2b0a21c4

View file

@ -223,9 +223,14 @@ void show_objectives(game_display& disp, const config& level, const std::string&
bool is_illegal_file_char(char c)
{
return c == '/' || c == '\\' || c == ':';
return c == '/' || c == '\\' || c == ':'
#ifdef WIN32
|| c == '?' || c == '|' || c == '<' || c == '>' || c == '*'
#endif
;
}
int get_save_name(display & disp,const std::string& message, const std::string& txt_label,
std::string* fname, gui::DIALOG_TYPE dialog_type, const std::string& title,
const bool has_exit_button, const bool ask_for_filename)