diff options
author | Max Horn | 2011-06-02 14:11:38 +0200 |
---|---|---|
committer | Max Horn | 2011-06-02 18:31:59 +0200 |
commit | 477d6233c3672d9a60cceea3570bc775df3d9253 (patch) | |
tree | 741ffe9dcb35fd2c9de405b7da74e572451c8304 /engines/touche | |
parent | 86240bb0dc0103e5099d23770cc04cfd907d2c61 (diff) | |
download | scummvm-rg350-477d6233c3672d9a60cceea3570bc775df3d9253.tar.gz scummvm-rg350-477d6233c3672d9a60cceea3570bc775df3d9253.tar.bz2 scummvm-rg350-477d6233c3672d9a60cceea3570bc775df3d9253.zip |
ENGINES: Change 2nd param of Engine::saveGameState to Common::String
Diffstat (limited to 'engines/touche')
-rw-r--r-- | engines/touche/saveload.cpp | 4 | ||||
-rw-r--r-- | engines/touche/touche.h | 2 |
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(); |