==1313424== Conditional jump or move depends on uninitialised value(s)
==1313424== at 0x682225: Common::wrapCompressedReadStream(Common::SeekableReadStream*, unsigned int) (zlib.cpp:498)
==1313424== by 0x46CDB9: DefaultSaveFileManager::openForLoading(Common::String const&) (default-saves.cpp:134)
==1313424== by 0x68334D: Common::PlaybackFile::openRead(Common::String const&) (recorderfile.cpp:74)
==1313424== by 0x444558: GUI::RecorderDialog::updateList() (recorderdialog.cpp:206)
==1313424== by 0x4446BD: GUI::RecorderDialog::runModal(Common::String&) (recorderdialog.cpp:218)
==1313424== by 0x3DF0E5: GUI::LauncherDialog::recordGame(int) (launcher.cpp:461)
==1313424== by 0x3E0397: GUI::LauncherDialog::handleCommand(GUI::CommandSender*, unsigned int, unsigned int) (launcher.cpp:671)
==1313424== by 0x400BF8: GUI::CommandSender::sendCommand(unsigned int, unsigned int) (object.h:55)
==1313424== by 0x42DAB8: GUI::DropdownButtonWidget::handleMouseUp(int, int, int, int) (widget.cpp:497)
==1313424== by 0x3D3A37: GUI::Dialog::handleMouseUp(int, int, int, int) (dialog.cpp:228)
==1313424== by 0x3DB72C: GUI::GuiManager::processEvent(Common::Event const&, GUI::Dialog*) (gui-manager.cpp:668)
==1313424== by 0x3DA9EA: GUI::GuiManager::runLoop() (gui-manager.cpp:429)
Happens when you start with the event recorder compiled into scummvm and open the dialog to start
a new record.
Though it seemed the _wrapped stream should return valid position, it
was always 0. That's why I've added a _pos field, which is updated in
write() and returned in pos().
It returns int32, because some complex streams are derived from both
WriteStream and ReadStream, and in ReadStream pos() returns int32,
because -1 means an error.
I had to change MemoryStream's uint32 to int32, which is probably not so
good.
This is needed by the "Mirage" Wintermute game.
Vorbis can do backward seeking, thus we need to enable this for ZIP
streams. Since this can be a potentially slow operation, we throw a
warning (once per stream) when it occurs. Originally, SEEK_END seeks
in GZipReadStream were disabled by commit 9138128f. Refer to patch
#2050337 for more information.