diff options
author | D G Turner | 2019-11-23 12:38:11 +0000 |
---|---|---|
committer | D G Turner | 2019-11-23 12:38:11 +0000 |
commit | 84398f85d8cad3ee2805cfdc6f5563aa4c7748d6 (patch) | |
tree | 82d6eb08fd2fbd38bcc9957228ebcf4a4b06143c /engines/glk/magnetic/glk.cpp | |
parent | 09b33cdc86f9231eb4cb7c828986e45dbf675ced (diff) | |
download | scummvm-rg350-84398f85d8cad3ee2805cfdc6f5563aa4c7748d6.tar.gz scummvm-rg350-84398f85d8cad3ee2805cfdc6f5563aa4c7748d6.tar.bz2 scummvm-rg350-84398f85d8cad3ee2805cfdc6f5563aa4c7748d6.zip |
GLK: MAGNETIC: Fix Compilation on AmigaOS4
This seems to be an issue where the initializer for the members called log
get confused for a call to the log() standard library function.
Renaming these members with leading underscores and adding some checks for
nullptr before usage are good practice in any case and should fix this.
Diffstat (limited to 'engines/glk/magnetic/glk.cpp')
-rw-r--r-- | engines/glk/magnetic/glk.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/engines/glk/magnetic/glk.cpp b/engines/glk/magnetic/glk.cpp index 7b70fa3976..1c0a366671 100644 --- a/engines/glk/magnetic/glk.cpp +++ b/engines/glk/magnetic/glk.cpp @@ -3980,13 +3980,17 @@ void Magnetic::writeChar(char c) { } void Magnetic::script_write(type8 c) { - if (log_on == 2) - log1->writeByte(c); + if (log_on == 2) { + if (_log1) { + _log1->writeByte(c); + } + } } void Magnetic::transcript_write(type8 c) { - if (log2) - log2->writeByte(c); + if (_log2) { + _log2->writeByte(c); + } } } // End of namespace Magnetic |