[Scummvm-git-logs] scummvm master -> 3fb39a82452460f7f5497a656f07ae45109653be
sev-
sev at scummvm.org
Sat Jul 10 22:53:47 UTC 2021
This automated email contains information about 9 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
dc798f3612 SAGA2: Better fix for CID 1457913
112d662ae4 SAGA2: Proper fix for out-of-bounds read. CID 1457984
031c279f78 SAGA2: Properly init gPanel. CID 1457870, 1457887, 1457904, 1457927
215d84e739 SAGA2: Initialize class variables. CID 1457941, 1457963
ac8e9ceefb SAGA2: Fixed to the start location creation. CID 1457971
37c1c24ec2 SAGA2: Added constructor to DirMaskGroup. CID 1457975
36d707a6db SAGA2: Fix warning. CID 1458015
dceeeb783c SAGA2: Initialize PlayerActor class variable. CID 1458011
3fb39a8245 SAGA2: Add default constructor for QueueItem. CID 1457960
Commit: dc798f3612d3b1f0f09dbcf5530d7126a001317c
https://github.com/scummvm/scummvm/commit/dc798f3612d3b1f0f09dbcf5530d7126a001317c
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-07-11T00:21:19+02:00
Commit Message:
SAGA2: Better fix for CID 1457913
Changed paths:
engines/saga2/fta.h
engines/saga2/intrface.cpp
diff --git a/engines/saga2/fta.h b/engines/saga2/fta.h
index 80f85805fa..6dc4632888 100644
--- a/engines/saga2/fta.h
+++ b/engines/saga2/fta.h
@@ -141,10 +141,10 @@ void resumeTimer(void); // resume game clock
// work correctly even if the game counter wraps around.
class Alarm {
-private:
+public:
uint32 basetime; // timer alarm was set
uint32 duration; // duration of alarm
-public:
+
void set(uint32 duration);
bool check(void);
uint32 elapsed(void); // time elapsed since alarm set
diff --git a/engines/saga2/intrface.cpp b/engines/saga2/intrface.cpp
index b73d606a9d..4ad8abcf7f 100644
--- a/engines/saga2/intrface.cpp
+++ b/engines/saga2/intrface.cpp
@@ -709,7 +709,8 @@ CStatusLine::CStatusLine(gPanelList &list,
lineQueue[i].text = nullptr;
lineQueue[i].frameTime = 0;
}
-
+ waitAlarm.basetime = waitAlarm.duration = 0;
+ minWaitAlarm.basetime = minWaitAlarm.duration = 0;
}
CStatusLine::~CStatusLine(void) {
Commit: 112d662ae4a19d0a87b89a42a32d29ffb6c0ba46
https://github.com/scummvm/scummvm/commit/112d662ae4a19d0a87b89a42a32d29ffb6c0ba46
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-07-11T00:28:37+02:00
Commit Message:
SAGA2: Proper fix for out-of-bounds read. CID 1457984
Changed paths:
engines/saga2/magic.cpp
diff --git a/engines/saga2/magic.cpp b/engines/saga2/magic.cpp
index 9c360b5378..8c4bd42f99 100644
--- a/engines/saga2/magic.cpp
+++ b/engines/saga2/magic.cpp
@@ -95,15 +95,19 @@ GameObject *GetOwner(GameObject *go) {
// This call looks up a spells object prototype. It can accept either
// an object ID or a spell ID
SkillProto *skillProtoFromID(int16 spellOrObjectID) {
- if (spellOrObjectID >= MAX_SPELLS)
+ if (spellOrObjectID > MAX_SPELLS)
return (SkillProto *)GameObject::protoAddress(spellOrObjectID);
+
+ if (spellOrObjectID >= totalSpellBookPages)
+ error("Wrong spellID: %d > %d", spellOrObjectID, totalSpellBookPages);
+
return spellBook[spellOrObjectID].getProto();
}
//-----------------------------------------------------------------------
// initialization call to connect skill prototypes with their spells
void initializeSkill(SkillProto *oNo, SpellID sNo) {
- if (sNo > 0 && sNo < MAX_SPELLS) {
+ if (sNo > 0 && sNo < totalSpellBookPages) {
if (spellBook[sNo].getProto() != NULL)
error("Duplicate prototype for spell %d", sNo);
spellBook[sNo].setProto(oNo);
Commit: 031c279f78f3a31a267057e7b9e6ee40bfb0ba77
https://github.com/scummvm/scummvm/commit/031c279f78f3a31a267057e7b9e6ee40bfb0ba77
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-07-11T00:32:36+02:00
Commit Message:
SAGA2: Properly init gPanel. CID 1457870, 1457887, 1457904, 1457927
Changed paths:
engines/saga2/panel.cpp
diff --git a/engines/saga2/panel.cpp b/engines/saga2/panel.cpp
index 22430f8138..de23ebf504 100644
--- a/engines/saga2/panel.cpp
+++ b/engines/saga2/panel.cpp
@@ -64,6 +64,10 @@ gPanel::gPanel(gWindow &win, const Rect16 &box, AppFunc *cmd)
ghosted = 0;
selected = 0;
imageLabel = 0;
+ title = nullptr;
+ id = 0;
+ wantMousePoll = 0;
+ userData = nullptr;
}
gPanel::gPanel(gPanelList &list, const Rect16 &box,
@@ -77,6 +81,8 @@ gPanel::gPanel(gPanelList &list, const Rect16 &box,
imageLabel = 0;
command = cmd;
id = ident;
+ wantMousePoll = 0;
+ userData = nullptr;
}
gPanel::gPanel(gPanelList &list, const Rect16 &box,
@@ -90,6 +96,8 @@ gPanel::gPanel(gPanelList &list, const Rect16 &box,
imageLabel = 1;
command = cmd;
id = ident;
+ wantMousePoll = 0;
+ userData = nullptr;
}
gPanel::gPanel(gPanelList &list, const StaticRect &box,
@@ -103,6 +111,8 @@ gPanel::gPanel(gPanelList &list, const StaticRect &box,
imageLabel = 0;
command = cmd;
id = ident;
+ wantMousePoll = 0;
+ userData = nullptr;
}
// Dummy virtual functions
Commit: 215d84e7396062d33829b82f4498f78af74bf496
https://github.com/scummvm/scummvm/commit/215d84e7396062d33829b82f4498f78af74bf496
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-07-11T00:37:34+02:00
Commit Message:
SAGA2: Initialize class variables. CID 1457941, 1457963
Changed paths:
engines/saga2/path.cpp
diff --git a/engines/saga2/path.cpp b/engines/saga2/path.cpp
index 2201e392b6..2da322290a 100644
--- a/engines/saga2/path.cpp
+++ b/engines/saga2/path.cpp
@@ -711,7 +711,10 @@ private:
int16 arraySize;
public:
- MaskComputer(void) : arraySize(0) {}
+ MaskComputer(void) : arraySize(0) {
+ for (int i = 0; i < 8; i++)
+ ptrArray[i] = nullptr;
+ }
DirMaskGroup *computeMask(uint8 objSection);
};
@@ -2199,8 +2202,10 @@ WanderPathRequest::WanderPathRequest(
tetherMinV = mTask->tetherMinV;
tetherMaxU = mTask->tetherMaxU;
tetherMaxV = mTask->tetherMaxV;
- } else
+ } else {
tethered = false;
+ tetherMinU = tetherMinV = tetherMaxU = tetherMaxV = 0;
+ }
}
// Initialize the static data members
Commit: ac8e9ceefb01b5e8e6f4a36244eb02d7eadede69
https://github.com/scummvm/scummvm/commit/ac8e9ceefb01b5e8e6f4a36244eb02d7eadede69
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-07-11T00:39:56+02:00
Commit Message:
SAGA2: Fixed to the start location creation. CID 1457971
Changed paths:
engines/saga2/path.cpp
diff --git a/engines/saga2/path.cpp b/engines/saga2/path.cpp
index 2da322290a..e309592ad5 100644
--- a/engines/saga2/path.cpp
+++ b/engines/saga2/path.cpp
@@ -2409,6 +2409,7 @@ static void spush(const TilePoint &tp, int cost, int direction) {
newItem.z = tp.z;
newItem.cost = cost;
newItem.direction = direction;
+ newItem.platform = 0;
squeue.insert(newItem);
}
Commit: 37c1c24ec2250ecbcd7d6f6f960bbceb1b4be21a
https://github.com/scummvm/scummvm/commit/37c1c24ec2250ecbcd7d6f6f960bbceb1b4be21a
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-07-11T00:41:44+02:00
Commit Message:
SAGA2: Added constructor to DirMaskGroup. CID 1457975
Changed paths:
engines/saga2/path.cpp
diff --git a/engines/saga2/path.cpp b/engines/saga2/path.cpp
index e309592ad5..8ab7733b2b 100644
--- a/engines/saga2/path.cpp
+++ b/engines/saga2/path.cpp
@@ -696,6 +696,7 @@ class DirMaskGroup {
void computeMask(uint8 objSection);
public:
+ DirMaskGroup() : crossSection(0) {}
DirMask &operator[](int16 index) {
return dMask[index];
}
Commit: 36d707a6dbafcd3c59767393b312a2ce854502f3
https://github.com/scummvm/scummvm/commit/36d707a6dbafcd3c59767393b312a2ce854502f3
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-07-11T00:43:36+02:00
Commit Message:
SAGA2: Fix warning. CID 1458015
Changed paths:
engines/saga2/path.cpp
diff --git a/engines/saga2/path.cpp b/engines/saga2/path.cpp
index 8ab7733b2b..748956190f 100644
--- a/engines/saga2/path.cpp
+++ b/engines/saga2/path.cpp
@@ -1349,6 +1349,7 @@ static void push(
newItem.platform = platform;
newItem.cost = cost;
newItem.direction = direction;
+ newItem.pad = 0;
if (queue.insert(newItem)) {
cellPtr->direction = direction;
Commit: dceeeb783c2b40280b5506ed6e2cfcc0e790c58c
https://github.com/scummvm/scummvm/commit/dceeeb783c2b40280b5506ed6e2cfcc0e790c58c
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-07-11T00:45:51+02:00
Commit Message:
SAGA2: Initialize PlayerActor class variable. CID 1458011
Changed paths:
engines/saga2/player.h
diff --git a/engines/saga2/player.h b/engines/saga2/player.h
index 7be248e0b4..b5abacd29a 100644
--- a/engines/saga2/player.h
+++ b/engines/saga2/player.h
@@ -99,22 +99,17 @@ public:
bool notifiedOfAttack;
// Constructor
- PlayerActor(ObjectID a) :
- actorID(a),
- portraitType(0),
- flags(0),
- readyNode(NULL),
- vitalityMemory(0) {
- int i;
+ PlayerActor(ObjectID a) : actorID(a), portraitType(0), flags(0), readyNode(NULL),
+ vitalityMemory(0), notifiedOfAttack(false) {
assert(ActorAttributes::skillFracPointsPerLevel > 0); // this is used in a divide
memset(&baseStats, 0, sizeof(baseStats));
- for (i = 0; i < numManas; i++)
+ for (int i = 0; i < numManas; i++)
manaMemory[i] = 0;
- for (i = 0; i < numSkills; i++) {
+ for (int i = 0; i < numSkills; i++) {
attribRecPools[i] = 0;
attribMemPools[i] = 0;
}
Commit: 3fb39a82452460f7f5497a656f07ae45109653be
https://github.com/scummvm/scummvm/commit/3fb39a82452460f7f5497a656f07ae45109653be
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-07-11T00:50:30+02:00
Commit Message:
SAGA2: Add default constructor for QueueItem. CID 1457960
Changed paths:
engines/saga2/path.cpp
diff --git a/engines/saga2/path.cpp b/engines/saga2/path.cpp
index 748956190f..c8733c3aae 100644
--- a/engines/saga2/path.cpp
+++ b/engines/saga2/path.cpp
@@ -654,6 +654,14 @@ struct QueueItem {
uint8 pad;
int16 cost; // Cost to get to this cell
+ QueueItem() {
+ z = 0;
+ u = v = 0;
+ platform = 0;
+ pad = 0;
+ cost = 0;
+ }
+
operator int() {
return cost;
}
More information about the Scummvm-git-logs
mailing list