diff options
Diffstat (limited to 'src/saveload')
-rw-r--r-- | src/saveload/saveload.cpp | 2 | ||||
-rw-r--r-- | src/saveload/saveload.h | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp index bfbf1957b..2bb960da6 100644 --- a/src/saveload/saveload.cpp +++ b/src/saveload/saveload.cpp @@ -2930,7 +2930,7 @@ void FileToSaveLoad::SetMode(SaveLoadOperation fop, AbstractFileType aft, Detail */ void FileToSaveLoad::SetName(const char *name) { - strecpy(this->name, name, lastof(this->name)); + this->name = name; } /** diff --git a/src/saveload/saveload.h b/src/saveload/saveload.h index a153b3630..5406462f6 100644 --- a/src/saveload/saveload.h +++ b/src/saveload/saveload.h @@ -12,6 +12,7 @@ #include "../fileio_type.h" #include "../strings_type.h" +#include <string> /** SaveLoad versions * Previous savegame versions, the trunk revision where they were @@ -337,7 +338,7 @@ struct FileToSaveLoad { SaveLoadOperation file_op; ///< File operation to perform. DetailedFileType detail_ftype; ///< Concrete file type (PNG, BMP, old save, etc). AbstractFileType abstract_ftype; ///< Abstract type of file (scenario, heightmap, etc). - char name[MAX_PATH]; ///< Name of the file. + std::string name; ///< Name of the file. char title[255]; ///< Internal name of the game. void SetMode(FiosType ft); |