diff options
author | Tobia Tesan | 2014-10-15 21:22:28 +0200 |
---|---|---|
committer | Tobia Tesan | 2014-10-15 21:36:47 +0200 |
commit | e9b722278e5c893bd488bdb7d430598ba711d5ee (patch) | |
tree | 2324502d1fc8ea84ce7cdf5e1c846826bdcaa153 | |
parent | 3cef639f911264547b08428110e33a3d5a595fee (diff) | |
download | scummvm-rg350-e9b722278e5c893bd488bdb7d430598ba711d5ee.tar.gz scummvm-rg350-e9b722278e5c893bd488bdb7d430598ba711d5ee.tar.bz2 scummvm-rg350-e9b722278e5c893bd488bdb7d430598ba711d5ee.zip |
WINTERMUTE: Declare and init size in one place in VideoSubtitler
-rw-r--r-- | engines/wintermute/video/video_subtitler.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/engines/wintermute/video/video_subtitler.cpp b/engines/wintermute/video/video_subtitler.cpp index 2123991c03..ed4677fffd 100644 --- a/engines/wintermute/video/video_subtitler.cpp +++ b/engines/wintermute/video/video_subtitler.cpp @@ -74,16 +74,15 @@ bool VideoSubtitler::loadSubtitles(const Common::String &filename, const Common: newFile = PathUtil::combine(path, name + ext); } - int size; - Common::SeekableReadStream *file = BaseFileManager::getEngineInstance()->openFile(newFile, true, false); if (file == nullptr) { return false; // no subtitles } - size = file->size(); + int size = file->size(); char *buffer = new char[size]; + file->read(buffer, size); int start, end; |