[Scummvm-git-logs] scummvm master -> b5f0be3d725d46b7c858dd8ef736b7b144742788

sev- sev at scummvm.org
Thu Apr 30 12:17:46 UTC 2020


This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
2f4fa27943 HDB: Use strlcpy
002e603c49 HDB: Initialize more class variables
b5f0be3d72 AVALANCHE: Use memmove for overlapping buffers


Commit: 2f4fa27943e1b04c7822fb23890cafdf44e23837
    https://github.com/scummvm/scummvm/commit/2f4fa27943e1b04c7822fb23890cafdf44e23837
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-04-30T13:46:00+02:00

Commit Message:
HDB: Use strlcpy

Changed paths:
    engines/hdb/hdb.h


diff --git a/engines/hdb/hdb.h b/engines/hdb/hdb.h
index e04e93245c..fe37fa84c5 100644
--- a/engines/hdb/hdb.h
+++ b/engines/hdb/hdb.h
@@ -191,7 +191,7 @@ public:
 	bool startMap(const char *name);
 
 	void changeMap(const char *name) {
-		strcpy(_changeMapname, name);
+		Common::strlcpy(_changeMapname, name, 64);
 		_changeLevel = true;
 	}
 
@@ -293,7 +293,7 @@ public:
 	void setInMapName(const char *name);
 
 	void changeLevel(const char *name) {
-		strcpy(_changeMapname, name);
+		Common::strlcpy(_changeMapname, name, 64);
 		_changeLevel = true;
 	}
 


Commit: 002e603c49538499ca06f664ca06242e63eb8d5f
    https://github.com/scummvm/scummvm/commit/002e603c49538499ca06f664ca06242e63eb8d5f
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-04-30T13:49:33+02:00

Commit Message:
HDB: Initialize more class variables

Changed paths:
    engines/hdb/ai-init.cpp


diff --git a/engines/hdb/ai-init.cpp b/engines/hdb/ai-init.cpp
index f6e37dd1a5..4867db318a 100644
--- a/engines/hdb/ai-init.cpp
+++ b/engines/hdb/ai-init.cpp
@@ -973,6 +973,8 @@ AI::AI() {
 	}
 	_tileFroglickMiddleLR = nullptr;
 	_gfxDragonAsleep = nullptr;
+	_goodjobGfx = nullptr;
+
 	for (int i = 0; i < 2; ++i)
 		_gfxDragonFlap[i] = nullptr;
 	for (int i = 0; i < 4; ++i) {
@@ -987,6 +989,8 @@ AI::AI() {
 		_getGfx[i] = nullptr;
 	for (int i = 0; i < ARRAYSIZE(_stunnedGfx); i++)
 		_stunnedGfx[i] = nullptr;
+	for (int i = 0; i < ARRAYSIZE(_stunLightningGfx); i++)
+		_stunLightningGfx[i] = nullptr;
 
 	_player = nullptr;
 	_cineAbortable = false;
@@ -1080,6 +1084,8 @@ AI::AI() {
 	_pushdownFrames = _pushupFrames = _pushleftFrames = _pushrightFrames = 0;
 	_stunDownFrames = _stunUpFrames = _stunLeftFrames = _stunRightFrames = 0;
 	_slugDownFrames = _slugUpFrames = _slugLeftFrames = _slugRightFrames = 0;
+
+	_gatePuddles = 0;
 }
 
 AI::~AI() {


Commit: b5f0be3d725d46b7c858dd8ef736b7b144742788
    https://github.com/scummvm/scummvm/commit/b5f0be3d725d46b7c858dd8ef736b7b144742788
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-04-30T13:51:23+02:00

Commit Message:
AVALANCHE: Use memmove for overlapping buffers

Changed paths:
    engines/avalanche/dialogs.cpp


diff --git a/engines/avalanche/dialogs.cpp b/engines/avalanche/dialogs.cpp
index 3ccba4e139..e79eb540cc 100644
--- a/engines/avalanche/dialogs.cpp
+++ b/engines/avalanche/dialogs.cpp
@@ -268,7 +268,7 @@ void Dialogs::scrollModeDialogue() {
 }
 
 void Dialogs::store(byte what, TuneType &played) {
-	memcpy(played, played + 1, sizeof(played) - 1);
+	memmove(played, played + 1, sizeof(played) - 1);
 	played[30] = what;
 }
 




More information about the Scummvm-git-logs mailing list