aboutsummaryrefslogtreecommitdiff
path: root/engines/touche
diff options
context:
space:
mode:
Diffstat (limited to 'engines/touche')
-rw-r--r--engines/touche/saveload.cpp4
-rw-r--r--engines/touche/touche.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/engines/touche/saveload.cpp b/engines/touche/saveload.cpp
index 334f75a0e8..7732c6deb9 100644
--- a/engines/touche/saveload.cpp
+++ b/engines/touche/saveload.cpp
@@ -319,7 +319,7 @@ void ToucheEngine::loadGameStateData(Common::ReadStream *stream) {
debug(0, "Loaded state, current episode %d", _currentEpisodeNum);
}
-Common::Error ToucheEngine::saveGameState(int num, const char *description) {
+Common::Error ToucheEngine::saveGameState(int num, const Common::String &description) {
bool saveOk = false;
Common::String gameStateFileName = generateGameStateFileName(_targetName.c_str(), num);
Common::OutSaveFile *f = _saveFileMan->openForSaving(gameStateFileName);
@@ -328,7 +328,7 @@ Common::Error ToucheEngine::saveGameState(int num, const char *description) {
f->writeUint16LE(0);
char headerDescription[kGameStateDescriptionLen];
memset(headerDescription, 0, kGameStateDescriptionLen);
- strncpy(headerDescription, description, kGameStateDescriptionLen - 1);
+ strncpy(headerDescription, description.c_str(), kGameStateDescriptionLen - 1);
f->write(headerDescription, kGameStateDescriptionLen);
saveGameStateData(f);
f->finalize();
diff --git a/engines/touche/touche.h b/engines/touche/touche.h
index c8d7504754..7e1aa3ac44 100644
--- a/engines/touche/touche.h
+++ b/engines/touche/touche.h
@@ -513,7 +513,7 @@ protected:
void saveGameStateData(Common::WriteStream *stream);
void loadGameStateData(Common::ReadStream *stream);
- virtual Common::Error saveGameState(int num, const char *description);
+ virtual Common::Error saveGameState(int num, const Common::String &description);
virtual Common::Error loadGameState(int num);
virtual bool canLoadGameStateCurrently();
virtual bool canSaveGameStateCurrently();