aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/drascula/saveload.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/engines/drascula/saveload.cpp b/engines/drascula/saveload.cpp
index 2165662b66..f61aeecded 100644
--- a/engines/drascula/saveload.cpp
+++ b/engines/drascula/saveload.cpp
@@ -49,14 +49,8 @@ bool DrasculaEngine::saveLoadScreen() {
error("Can't open %s file", fileEpa);
}
}
- 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';
+ strncpy(names[n], sav->readLine().c_str(), 23);
}
delete sav;