aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2019-04-16 22:08:33 -0700
committerPaul Gilbert2019-04-17 20:46:07 -0700
commit4ff974778cdd81b6f6b528a1a96667764b12f70e (patch)
treefead003d6c4ae928ceb3b51c112b9f6ee5ff3b19 /engines
parent427e051f6a1d2b5740b9f3ab0c5e3df9df7494fb (diff)
downloadscummvm-rg350-4ff974778cdd81b6f6b528a1a96667764b12f70e.tar.gz
scummvm-rg350-4ff974778cdd81b6f6b528a1a96667764b12f70e.tar.bz2
scummvm-rg350-4ff974778cdd81b6f6b528a1a96667764b12f70e.zip
GLK: GLULXE: Fix reading game header information
Diffstat (limited to 'engines')
-rw-r--r--engines/glk/glulxe/glulxe.cpp4
-rw-r--r--engines/glk/glulxe/vm.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/engines/glk/glulxe/glulxe.cpp b/engines/glk/glulxe/glulxe.cpp
index a78e22cea4..617bcb08c8 100644
--- a/engines/glk/glulxe/glulxe.cpp
+++ b/engines/glk/glulxe/glulxe.cpp
@@ -105,7 +105,7 @@ bool Glulxe::is_gamefile_valid() {
}
void Glulxe::fatal_error_handler(const char *str, const char *arg, bool useVal, int val) {
- Common::String msg = "Glulxe fatal error: ";
+ Common::String msg = Common::String::format("Glulxe fatal error: %s", str);
if (arg || useVal) {
msg += " (";
@@ -124,7 +124,7 @@ void Glulxe::fatal_error_handler(const char *str, const char *arg, bool useVal,
}
void Glulxe::nonfatal_warning_handler(const char *str, const char *arg, bool useVal, int val) {
- Common::String msg = "Glulxe warning: ";
+ Common::String msg = Common::String::format("Glulxe warning: %s", str);
if (arg || useVal) {
msg += " (";
diff --git a/engines/glk/glulxe/vm.cpp b/engines/glk/glulxe/vm.cpp
index 44ea106e69..c4d90ed688 100644
--- a/engines/glk/glulxe/vm.cpp
+++ b/engines/glk/glulxe/vm.cpp
@@ -35,7 +35,7 @@ void Glulxe::setup_vm() {
stream_char_handler = nullptr;
stream_unichar_handler = nullptr;
- _gameFile.seek(0);
+ _gameFile.seek(gamefile_start + 8);
if (_gameFile.read(buf, 4 * 7) != (4 * 7))
fatal_error("The game file header is too short.");