Simplify line reading with the simpler readLine(), instead of readLine_NEW

svn-id: r35216
This commit is contained in:
Filippos Karapetis 2008-12-03 11:47:57 +00:00
parent c290bb977c
commit 29f59d07f4

View File

@ -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;