mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 06:08:35 +00:00
PARALLACTION: Safer string manipulation
This commit is contained in:
parent
b16c5439b0
commit
506549ae45
@ -395,7 +395,7 @@ void Parallaction_ns::changeLocation() {
|
||||
changeCharacter(locname.character());
|
||||
}
|
||||
|
||||
strcpy(g_saveData1, locname.location());
|
||||
Common::strlcpy(g_saveData1, locname.location(), 30);
|
||||
parseLocation(g_saveData1);
|
||||
|
||||
if (_location._startPosition.x != -1000) {
|
||||
|
@ -93,7 +93,7 @@ void SaveLoad_ns::doLoadGame(uint16 slot) {
|
||||
uint16 _si;
|
||||
for (_si = 0; _si < _vm->_numLocations; _si++) {
|
||||
s = f->readLine();
|
||||
strcpy(_vm->_locationNames[_si], s.c_str());
|
||||
Common::strlcpy(_vm->_locationNames[_si], s.c_str(), 32);
|
||||
|
||||
s = f->readLine();
|
||||
_vm->_localFlags[_si] = atoi(s.c_str());
|
||||
|
@ -335,7 +335,7 @@ void SoundMan_ns::setMusicVolume(int value) {
|
||||
}
|
||||
|
||||
void SoundMan_ns::setMusicFile(const char *filename) {
|
||||
strcpy(_musicFile, filename);
|
||||
Common::strlcpy(_musicFile, filename, PATH_LEN);
|
||||
}
|
||||
|
||||
void SoundMan_ns::execute(int command, const char *parm = 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user