SAGA2: Fix object name loading

This commit is contained in:
Eugene Sandulenko 2021-06-21 15:12:10 +02:00
parent d295808363
commit 7e73510bb4
No known key found for this signature in database
GPG key ID: 014D387312D34F08

View file

@ -2524,8 +2524,7 @@ void initPrototypes(void) {
debugC(5, kDebugLoading, "Read string (size %d): %s", s.size(), s.c_str());
char *name = new char[s.size() + 1];
Common::strlcpy(name, s.c_str(), s.size());
name[s.size()] = '\0';
Common::strlcpy(name, s.c_str(), s.size() + 1);
nameList.push_back(name);
}
nameListCount = count;