[Scummvm-git-logs] scummvm master -> da6dbd117502d31223141a5b1a643ea6637d8e3f
Strangerke
Strangerke at scummvm.org
Mon Jun 7 23:10:26 UTC 2021
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:
da6dbd1175 TRECISION: Add a safeguard to avoid accessing _panel with a -1 index, small cleanup
Commit: da6dbd117502d31223141a5b1a643ea6637d8e3f
https://github.com/scummvm/scummvm/commit/da6dbd117502d31223141a5b1a643ea6637d8e3f
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2021-06-08T00:10:11+01:00
Commit Message:
TRECISION: Add a safeguard to avoid accessing _panel with a -1 index, small cleanup
Changed paths:
engines/trecision/3d.cpp
engines/trecision/dialog.cpp
diff --git a/engines/trecision/3d.cpp b/engines/trecision/3d.cpp
index e80a73c2cb..54b415f03f 100644
--- a/engines/trecision/3d.cpp
+++ b/engines/trecision/3d.cpp
@@ -875,7 +875,7 @@ PathFinding3D::~PathFinding3D() {
}
void PathFinding3D::findPath() {
- int16 b;
+ int32 b;
Actor *actor = _vm->_actor;
actor->_px += actor->_dx;
@@ -921,7 +921,7 @@ void PathFinding3D::findPath() {
++_numPathNodes;
// CORNERS - lever intersections in corners
- if ((b == _panel[_oldPanel]._nearPanel1) || (b == _panel[_oldPanel]._nearPanel2)) {
+ if (_oldPanel >= 0 && (b == _panel[_oldPanel]._nearPanel1 || b == _panel[_oldPanel]._nearPanel2)) {
// otherwise if it's near the starting panel
if ((_pathNode[_numPathNodes - 1]._dist < EPSILON) &&
(b != _oldPanel) && (b != _curPanel)) {
diff --git a/engines/trecision/dialog.cpp b/engines/trecision/dialog.cpp
index acfa7b8baa..d759a80e6e 100644
--- a/engines/trecision/dialog.cpp
+++ b/engines/trecision/dialog.cpp
@@ -31,7 +31,7 @@
#include "trecision/video.h"
namespace Trecision {
-inline void Dialog::clear() {
+void Dialog::clear() {
_flag = 0;
_interlocutor = 0;
memset(_startAnim, 0, 14);
More information about the Scummvm-git-logs
mailing list