Author: baufo
Date: Thu May 22 11:45:20 2008
New Revision: 26764
URL: http://svn.gna.org/viewcvs/wesnoth?rev=26764&view=rev
Log:
Fixing bug #11665: Filename saves allow illegal characters resulting in game
crash.
Modified:
branches/1.4/src/dialogs.cpp
Modified: branches/1.4/src/dialogs.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/branches/1.4/src/dialogs.cpp?rev=26764&r1=26763&r2=26764&view=diff
==============================================================================
--- branches/1.4/src/dialogs.cpp (original)
+++ branches/1.4/src/dialogs.cpp Thu May 22 11:45:20 2008
@@ -223,8 +223,13 @@
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,
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits