aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction
diff options
context:
space:
mode:
authorEugene Sandulenko2016-05-04 21:14:54 +0200
committerEugene Sandulenko2016-05-04 21:15:58 +0200
commit5cfbb176e793797d1345429f88d7efe4b733f98e (patch)
treee549ac7aef17c0d5e7174bd7816af7980e9fc9a5 /engines/parallaction
parentd5b4f8ee7eb6c53d6cf68274a9aded3f99be7650 (diff)
downloadscummvm-rg350-5cfbb176e793797d1345429f88d7efe4b733f98e.tar.gz
scummvm-rg350-5cfbb176e793797d1345429f88d7efe4b733f98e.tar.bz2
scummvm-rg350-5cfbb176e793797d1345429f88d7efe4b733f98e.zip
PARALLACTION: Use strncpy
Diffstat (limited to 'engines/parallaction')
-rw-r--r--engines/parallaction/objects.cpp2
-rw-r--r--engines/parallaction/parallaction.cpp2
-rw-r--r--engines/parallaction/parallaction_br.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/engines/parallaction/objects.cpp b/engines/parallaction/objects.cpp
index 50a5b38d8d..68890cda50 100644
--- a/engines/parallaction/objects.cpp
+++ b/engines/parallaction/objects.cpp
@@ -163,7 +163,7 @@ int16 Program::findLocal(const char* name) {
int16 Program::addLocal(const char *name, int16 value, int16 min, int16 max) {
assert(_numLocals < NUM_LOCALS);
- strcpy(_localNames[_numLocals], name);
+ strncpy(_localNames[_numLocals], name, 10);
_locals[_numLocals].setRange(min, max);
_locals[_numLocals].setValue(value);
diff --git a/engines/parallaction/parallaction.cpp b/engines/parallaction/parallaction.cpp
index af898b2e20..e11aeed0f0 100644
--- a/engines/parallaction/parallaction.cpp
+++ b/engines/parallaction/parallaction.cpp
@@ -210,7 +210,7 @@ void Parallaction::allocateLocationSlot(const char *name) {
error("No more location slots available. Please report this immediately to ScummVM team");
if (_currentLocationIndex == -1) {
- strcpy(_locationNames[_numLocations], name);
+ strncpy(_locationNames[_numLocations], name, 10);
_currentLocationIndex = _numLocations;
_numLocations++;
diff --git a/engines/parallaction/parallaction_br.cpp b/engines/parallaction/parallaction_br.cpp
index 1e1c0b0a3d..78131c4ec8 100644
--- a/engines/parallaction/parallaction_br.cpp
+++ b/engines/parallaction/parallaction_br.cpp
@@ -320,7 +320,7 @@ void Parallaction_br::changeLocation() {
freeLocation(false);
// load new location
- strcpy(_location._name, _newLocationName.c_str());
+ strncpy(_location._name, _newLocationName.c_str(), 100);
parseLocation(_location._name);
if (_location._startPosition.x != -1000) {