[Scummvm-cvs-logs] scummvm master -> 8a3b57803fe94f16bd3d89fae4d117555b87e21f
sev-
sev at scummvm.org
Wed May 4 23:58:13 CEST 2016
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
8a3b57803f PARALLACTION: Use Common::strlcpy instead of strncpy as suggested by LordHoto
Commit: 8a3b57803fe94f16bd3d89fae4d117555b87e21f
https://github.com/scummvm/scummvm/commit/8a3b57803fe94f16bd3d89fae4d117555b87e21f
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-05-04T23:57:34+02:00
Commit Message:
PARALLACTION: Use Common::strlcpy instead of strncpy as suggested by LordHoto
Changed paths:
engines/parallaction/objects.cpp
engines/parallaction/parallaction.cpp
engines/parallaction/parallaction_br.cpp
diff --git a/engines/parallaction/objects.cpp b/engines/parallaction/objects.cpp
index 68890cd..8f895f1 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 e11aeed..bbe759d 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 78131c4..9f045cb 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) {
More information about the Scummvm-git-logs
mailing list