[Scummvm-git-logs] scummvm master -> bd6c7a993d039a6aafd1ecd9860a455127b8e871

dreammaster noreply at scummvm.org
Fri Aug 9 02:23:28 UTC 2024


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:
bd6c7a993d GLK: TADS: Allow osfgetc to return EOF


Commit: bd6c7a993d039a6aafd1ecd9860a455127b8e871
    https://github.com/scummvm/scummvm/commit/bd6c7a993d039a6aafd1ecd9860a455127b8e871
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2024-08-08T19:12:57-07:00

Commit Message:
GLK: TADS: Allow osfgetc to return EOF

Changed paths:
    engines/glk/tads/os_frob_tads.cpp


diff --git a/engines/glk/tads/os_frob_tads.cpp b/engines/glk/tads/os_frob_tads.cpp
index af753f912aa..6265e743fc0 100644
--- a/engines/glk/tads/os_frob_tads.cpp
+++ b/engines/glk/tads/os_frob_tads.cpp
@@ -143,7 +143,8 @@ int osfflush(osfildef *fp) {
 }
 
 int osfgetc(osfildef *fp) {
-	return dynamic_cast<Common::ReadStream *>(fp)->readByte();
+    Common::ReadStream *s = dynamic_cast<Common::ReadStream *>(fp);
+    return s->eos() ? EOF : s->readByte();
 }
 
 int osfrb(osfildef *fp, void *buf, size_t bufl) {




More information about the Scummvm-git-logs mailing list