aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Hoops2010-05-25 18:11:14 +0000
committerMatthew Hoops2010-05-25 18:11:14 +0000
commit5f3952e5787079d8acd3476d3b7f0d67116b5d94 (patch)
tree8428f17e326878a753e797338c12893fbb0c29dd
parent849cfe4f0e5793caf648cb8fb030698c88c622f5 (diff)
downloadscummvm-rg350-5f3952e5787079d8acd3476d3b7f0d67116b5d94.tar.gz
scummvm-rg350-5f3952e5787079d8acd3476d3b7f0d67116b5d94.tar.bz2
scummvm-rg350-5f3952e5787079d8acd3476d3b7f0d67116b5d94.zip
Fix a Myst regression: not a good idea to use memset on a Common::String :)
svn-id: r49215
-rw-r--r--engines/mohawk/video.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/engines/mohawk/video.cpp b/engines/mohawk/video.cpp
index 99fa8b23f0..3a86e0323b 100644
--- a/engines/mohawk/video.cpp
+++ b/engines/mohawk/video.cpp
@@ -121,7 +121,9 @@ void VideoManager::waitUntilMovieEnds(VideoHandle videoHandle) {
}
delete _videoStreams[videoHandle].video;
- memset(&_videoStreams[videoHandle], 0, sizeof(VideoEntry));
+ _videoStreams[videoHandle].video = 0;
+ _videoStreams[videoHandle].id = 0;
+ _videoStreams[videoHandle].filename = "";
}
void VideoManager::playBackgroundMovie(Common::String filename, int16 x, int16 y, bool loop) {
@@ -152,8 +154,9 @@ bool VideoManager::updateBackgroundMovies() {
_videoStreams[i]->rewind();
} else {
delete _videoStreams[i].video;
- memset(&_videoStreams[i], 0, sizeof(VideoEntry));
- _videoStreams[i].video = NULL;
+ _videoStreams[i].video = 0;
+ _videoStreams[i].id = 0;
+ _videoStreams[i].filename = "";
continue;
}
}