aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction
diff options
context:
space:
mode:
authorEugene Sandulenko2016-05-04 23:57:34 +0200
committerEugene Sandulenko2016-05-04 23:57:34 +0200
commit8a3b57803fe94f16bd3d89fae4d117555b87e21f (patch)
tree827e42184043ff0a8f8e4e2409eb5216037d8124 /engines/parallaction
parentb8f288873bbcd54e7a984ccd9ae56e82e78aa631 (diff)
downloadscummvm-rg350-8a3b57803fe94f16bd3d89fae4d117555b87e21f.tar.gz
scummvm-rg350-8a3b57803fe94f16bd3d89fae4d117555b87e21f.tar.bz2
scummvm-rg350-8a3b57803fe94f16bd3d89fae4d117555b87e21f.zip
PARALLACTION: Use Common::strlcpy instead of strncpy as suggested by LordHoto
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 68890cda50..8f895f1532 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);
- strncpy(_localNames[_numLocals], name, 10);
+ Common::strlcpy(_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 e11aeed0f0..bbe759dffe 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) {
- strncpy(_locationNames[_numLocations], name, 10);
+ Common::strlcpy(_locationNames[_numLocations], name, 10);
_currentLocationIndex = _numLocations;
_numLocations++;
diff --git a/engines/parallaction/parallaction_br.cpp b/engines/parallaction/parallaction_br.cpp
index 78131c4ec8..9f045cb397 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
- strncpy(_location._name, _newLocationName.c_str(), 100);
+ Common::strlcpy(_location._name, _newLocationName.c_str(), 100);
parseLocation(_location._name);
if (_location._startPosition.x != -1000) {