aboutsummaryrefslogtreecommitdiff
path: root/engines/drascula
diff options
context:
space:
mode:
authorFilippos Karapetis2008-12-03 08:59:12 +0000
committerFilippos Karapetis2008-12-03 08:59:12 +0000
commite7050a0c65c9e474a7e072f0883ce9858eb4bacd (patch)
treef2b40be12606b9038197b3738f2f2d790d8e1882 /engines/drascula
parent318f71673796817cc4692ec5565fb8758a795b6b (diff)
downloadscummvm-rg350-e7050a0c65c9e474a7e072f0883ce9858eb4bacd.tar.gz
scummvm-rg350-e7050a0c65c9e474a7e072f0883ce9858eb4bacd.tar.bz2
scummvm-rg350-e7050a0c65c9e474a7e072f0883ce9858eb4bacd.zip
readLine_OLD -> readLine_NEW
svn-id: r35213
Diffstat (limited to 'engines/drascula')
-rw-r--r--engines/drascula/saveload.cpp11
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);