This commit is contained in:
Regalis
2015-08-04 23:49:08 +03:00
parent 47678c34c4
commit 08c5117e8f
8 changed files with 58 additions and 15 deletions

View File

@@ -252,7 +252,14 @@ namespace Subsurface
break;
case "savemap":
if (commands.Length < 2) break;
Submarine.SaveCurrent("Content/SavedMaps/" + string.Join(" ", commands.Skip(1))+".gz");
string fileName = string.Join(" ", commands.Skip(1));
if (fileName.Contains("../"))
{
DebugConsole.ThrowError("Illegal symbols in filename (../)");
return;
}
Submarine.SaveCurrent("Content/SavedMaps/" + fileName +".gz");
NewMessage("map saved", Color.Green);
break;
case "loadmap":