[Scummvm-git-logs] scummvm master -> 28cd40cdd13a23814e95ad940a030c7b7164e9b3
dreammaster
paulfgilbert at gmail.com
Mon Aug 31 04:42:49 UTC 2020
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:
28cd40cdd1 GLK: GLULX: Fix startup stream crashes
Commit: 28cd40cdd13a23814e95ad940a030c7b7164e9b3
https://github.com/scummvm/scummvm/commit/28cd40cdd13a23814e95ad940a030c7b7164e9b3
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2020-08-30T21:27:48-07:00
Commit Message:
GLK: GLULX: Fix startup stream crashes
Changed paths:
engines/glk/glulx/detection_tables.h
engines/glk/streams.cpp
engines/glk/streams.h
diff --git a/engines/glk/glulx/detection_tables.h b/engines/glk/glulx/detection_tables.h
index 419313e4ee..811e9eea3f 100644
--- a/engines/glk/glulx/detection_tables.h
+++ b/engines/glk/glulx/detection_tables.h
@@ -304,7 +304,7 @@ const PlainGameDescriptor GLULXE_GAME_LIST[] = {
const GlkDetectionEntry GLULXE_GAMES[] = {
// English games
DT_ENTRY0("aafn", "98c22f842ffadfb08a8e2a93d32c7495", 163328),
- DT_ENTRY0("aafn", "07d590dc62f0be38f6f879763b6eb12c", 163072),
+ DT_ENTRY1("aafn", "Corrupt", "07d590dc62f0be38f6f879763b6eb12c", 163072),
DT_ENTRY1("acg", "070501", "1a3eb782d28dd8ae8da40f21adb174f0", 817408),
DT_ENTRY1("adventglulx", "961209", "e1939485dc2d4aab637144fc842b479d", 195406),
DT_ENTRY1("adventglulx", "961209", "cf232df2a3364a6f0821a8ef631c81a1", 167424),
diff --git a/engines/glk/streams.cpp b/engines/glk/streams.cpp
index a2dbbab1ed..af0245ef6e 100644
--- a/engines/glk/streams.cpp
+++ b/engines/glk/streams.cpp
@@ -977,7 +977,13 @@ void IOStream::setPosition(int pos, uint seekMode) {
if (_inStream) {
_inStream->seek(pos, SEEK_SET);
} else {
- error("seek not supported for writing files");
+ Common::SeekableWriteStream *ws =
+ dynamic_cast<Common::SeekableWriteStream *>(_outStream);
+
+ if (ws)
+ ws->seek(pos, SEEK_SET);
+ else
+ error("seek not supported for writing files");
}
}
diff --git a/engines/glk/streams.h b/engines/glk/streams.h
index 2f43369493..de7eb9b576 100644
--- a/engines/glk/streams.h
+++ b/engines/glk/streams.h
@@ -645,7 +645,7 @@ public:
* Set the current output stream
*/
void setCurrent(Stream *stream) {
- assert(stream->_writable);
+ assert(!stream || stream->_writable);
_currentStream = stream;
}
More information about the Scummvm-git-logs
mailing list