[Scummvm-git-logs] scummvm master -> 410a3241f1b7996398b8be620a900fa99e5e42d3
AndywinXp
noreply at scummvm.org
Tue Apr 30 15:07:43 UTC 2024
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:
410a3241f1 SCUMM: HE: Address some PVS issues
Commit: 410a3241f1b7996398b8be620a900fa99e5e42d3
https://github.com/scummvm/scummvm/commit/410a3241f1b7996398b8be620a900fa99e5e42d3
Author: AndywinXp (andywinxp at gmail.com)
Date: 2024-04-30T17:07:37+02:00
Commit Message:
SCUMM: HE: Address some PVS issues
PVS-Studio V519, V501
Thanks sluicebox!
Changed paths:
engines/scumm/he/gfx_comp/trle_comp.cpp
engines/scumm/he/moonbase/moonbase_gfx.cpp
engines/scumm/he/script_v90he.cpp
engines/scumm/he/sprite_he.cpp
diff --git a/engines/scumm/he/gfx_comp/trle_comp.cpp b/engines/scumm/he/gfx_comp/trle_comp.cpp
index d5bcc915e98..ae20bc7f377 100644
--- a/engines/scumm/he/gfx_comp/trle_comp.cpp
+++ b/engines/scumm/he/gfx_comp/trle_comp.cpp
@@ -2512,10 +2512,10 @@ int Wiz::trleRLECompression(byte *pdest, const WizRawPixel *psource, int rowsize
_trlePutSize = 0;
if (_uses16BitColor) {
- _trleBuf[0] = lastc = c = (*source16++);
+ lastc = c = (*source16++);
_trleBuf[0] = (byte)c;
} else {
- _trleBuf[0] = lastc = c = (*source8++);
+ lastc = c = (*source8++);
_trleBuf[0] = (byte)c;
}
diff --git a/engines/scumm/he/moonbase/moonbase_gfx.cpp b/engines/scumm/he/moonbase/moonbase_gfx.cpp
index 08b903ce335..e76ffb5f8d0 100644
--- a/engines/scumm/he/moonbase/moonbase_gfx.cpp
+++ b/engines/scumm/he/moonbase/moonbase_gfx.cpp
@@ -132,7 +132,7 @@ static bool getMoonbaseWizSizeAndType(ScummEngine_v71he *vm, WizImage *wizPtr, i
if (!workPtr) {
sizeX = 0;
- sizeX = 0;
+ sizeY = 0;
compType = 0;
return false;
diff --git a/engines/scumm/he/script_v90he.cpp b/engines/scumm/he/script_v90he.cpp
index db4cccfca5c..aca2931ce6f 100644
--- a/engines/scumm/he/script_v90he.cpp
+++ b/engines/scumm/he/script_v90he.cpp
@@ -1665,7 +1665,7 @@ void ScummEngine_v90he::o90_getOverlap() {
_sprite->getSpriteLogicalRect(firstList[0], &firstRect);
_sprite->getSpriteLogicalRect(lastList[0], &lastRect);
- if (!_wiz->isRectValid(firstRect) || !_wiz->isRectValid(firstRect)) {
+ if (!_wiz->isRectValid(firstRect)) {
push(0);
break;
}
@@ -1684,7 +1684,7 @@ void ScummEngine_v90he::o90_getOverlap() {
_sprite->getSpriteDrawRect(firstList[0], &firstRect);
_sprite->getSpriteDrawRect(lastList[0], &lastRect);
- if (!_wiz->isRectValid(firstRect) || !_wiz->isRectValid(firstRect)) {
+ if (!_wiz->isRectValid(firstRect)) {
push(0);
break;
}
@@ -1707,7 +1707,7 @@ void ScummEngine_v90he::o90_getOverlap() {
lastRect.right = lastList[2];
lastRect.bottom = lastList[3];
- if (!_wiz->isRectValid(firstRect) || _wiz->isRectValid(firstRect)) {
+ if (!_wiz->isRectValid(firstRect)) {
push(0);
break;
}
@@ -1727,7 +1727,7 @@ void ScummEngine_v90he::o90_getOverlap() {
lastRect.right = lastList[2];
lastRect.bottom = lastList[3];
- if (!_wiz->isRectValid(firstRect) || !_wiz->isRectValid(firstRect)) {
+ if (!_wiz->isRectValid(firstRect)) {
push(0);
break;
}
diff --git a/engines/scumm/he/sprite_he.cpp b/engines/scumm/he/sprite_he.cpp
index 7a5fec2ea3a..2d4a6d7872b 100644
--- a/engines/scumm/he/sprite_he.cpp
+++ b/engines/scumm/he/sprite_he.cpp
@@ -1435,7 +1435,7 @@ void Sprite::eraseSprites() {
eraseRect.left = 1234;
eraseRect.top = 1234;
- eraseRect.left = -1234;
+ eraseRect.right = -1234;
eraseRect.bottom = -1234;
spritePtr = _activeSprites;
More information about the Scummvm-git-logs
mailing list