[Scummvm-git-logs] scummvm master -> 5f6705f476731d00d0a098fe1e0f4e22915fa6c5
sev-
sev at scummvm.org
Wed May 20 22:45:19 UTC 2020
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
990ce9b9a2 JANITORIAL: Whitespace fixes
5f6705f476 DIRECTOR: Added sanity checks to sprite drawing
Commit: 990ce9b9a245ecd76355688cae6fff287931d127
https://github.com/scummvm/scummvm/commit/990ce9b9a245ecd76355688cae6fff287931d127
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-05-20T23:25:24+02:00
Commit Message:
JANITORIAL: Whitespace fixes
Changed paths:
engines/director/score.cpp
diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index 112dc93a41..04625e69ed 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -780,9 +780,9 @@ void Score::setSpriteBboxes() {
switch (castType) {
case kCastShape:
sp->_startBbox = Common::Rect(sp->_currentPoint.x,
- sp->_currentPoint.y,
- sp->_currentPoint.x + sp->_width,
- sp->_currentPoint.y + sp->_height);
+ sp->_currentPoint.y,
+ sp->_currentPoint.x + sp->_width,
+ sp->_currentPoint.y + sp->_height);
break;
case kCastRTE:
case kCastText: {
Commit: 5f6705f476731d00d0a098fe1e0f4e22915fa6c5
https://github.com/scummvm/scummvm/commit/5f6705f476731d00d0a098fe1e0f4e22915fa6c5
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-05-21T00:44:58+02:00
Commit Message:
DIRECTOR: Added sanity checks to sprite drawing
Changed paths:
engines/director/score.cpp
diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index 04625e69ed..cbde8b40b2 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -877,6 +877,10 @@ void Score::setSpriteBboxes() {
int height = sp->_height;
int width = _vm->getVersion() > 4 ? bc->_initialRect.width() : sp->_width;
+ // If one of the dimensions is invalid, invalidate whole thing
+ if (width == 0 || height == 0)
+ width = height = 0;
+
sp->_startBbox = Common::Rect(x, y, x + width, y + height);
break;
}
@@ -2322,6 +2326,14 @@ void Score::inkBasedBlit(Graphics::ManagedSurface *maskSurface, const Graphics::
maskSurface->clear(0);
}
+ drawRect.clip(Common::Rect(_maskSurface->w, _maskSurface->h));
+
+
+ if (drawRect.isEmpty()) {
+ warning("Score::inkBasedBlit(): empty drawRect");
+ return;
+ }
+
maskSurface->blitFrom(*_maskSurface, drawRect, Common::Point(0, 0));
drawRect.clip(t);
More information about the Scummvm-git-logs
mailing list