diff options
author | Filippos Karapetis | 2008-12-03 08:59:12 +0000 |
---|---|---|
committer | Filippos Karapetis | 2008-12-03 08:59:12 +0000 |
commit | e7050a0c65c9e474a7e072f0883ce9858eb4bacd (patch) | |
tree | f2b40be12606b9038197b3738f2f2d790d8e1882 | |
parent | 318f71673796817cc4692ec5565fb8758a795b6b (diff) | |
download | scummvm-rg350-e7050a0c65c9e474a7e072f0883ce9858eb4bacd.tar.gz scummvm-rg350-e7050a0c65c9e474a7e072f0883ce9858eb4bacd.tar.bz2 scummvm-rg350-e7050a0c65c9e474a7e072f0883ce9858eb4bacd.zip |
readLine_OLD -> readLine_NEW
svn-id: r35213
-rw-r--r-- | engines/drascula/saveload.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/engines/drascula/saveload.cpp b/engines/drascula/saveload.cpp index 503d2ab639..2165662b66 100644 --- a/engines/drascula/saveload.cpp +++ b/engines/drascula/saveload.cpp @@ -49,8 +49,15 @@ bool DrasculaEngine::saveLoadScreen() { error("Can't open %s file", fileEpa); } } - for (n = 0; n < NUM_SAVES; n++) - sav->readLine_OLD(names[n], 23); + int l; + for (n = 0; n < NUM_SAVES; n++) { + sav->readLine_NEW(names[n], 23); + // readLine_NEW also returns the newline character (\n), + // so we need to clear it here + l = strlen(names[n]); + if (l > 0 && names[n][l - 1] == '\n') + names[n][l - 1] = '\0'; + } delete sav; loadPic("savescr.alg", bgSurface, HALF_PAL); |