diff options
author | Paul Gilbert | 2019-08-16 18:21:58 -0700 |
---|---|---|
committer | Paul Gilbert | 2019-08-16 18:26:27 -0700 |
commit | a6c5caf1fbcad5a1b096a6dc666d7bc9c9096dd0 (patch) | |
tree | 5a774d30dbe8a210d438efdbd57748b10bc73198 /engines | |
parent | 45de5828df011a7dc33b6da3bb73324ac067eab2 (diff) | |
download | scummvm-rg350-a6c5caf1fbcad5a1b096a6dc666d7bc9c9096dd0.tar.gz scummvm-rg350-a6c5caf1fbcad5a1b096a6dc666d7bc9c9096dd0.tar.bz2 scummvm-rg350-a6c5caf1fbcad5a1b096a6dc666d7bc9c9096dd0.zip |
GLK: FROTZ: Properly implement os_char_width
This fixes a memory corruption in the Arthur startup
Diffstat (limited to 'engines')
-rw-r--r-- | engines/glk/frotz/glk_interface.cpp | 4 | ||||
-rw-r--r-- | engines/glk/frotz/processor.cpp | 1 |
2 files changed, 1 insertions, 4 deletions
diff --git a/engines/glk/frotz/glk_interface.cpp b/engines/glk/frotz/glk_interface.cpp index 6f1f36e28d..8bbd154360 100644 --- a/engines/glk/frotz/glk_interface.cpp +++ b/engines/glk/frotz/glk_interface.cpp @@ -248,9 +248,7 @@ bool GlkInterface::initPictures() { } int GlkInterface::os_char_width(zchar z) { - // Note: I'm presuming this is 1 because Glk Text Grid windows take care of font sizes internally, - // so we can pretend that any font has a 1x1 size - return 1; + return g_conf->_monoInfo._cellW; } int GlkInterface::os_string_width(const zchar *s) { diff --git a/engines/glk/frotz/processor.cpp b/engines/glk/frotz/processor.cpp index 22ea530b64..b253510d79 100644 --- a/engines/glk/frotz/processor.cpp +++ b/engines/glk/frotz/processor.cpp @@ -246,7 +246,6 @@ void Processor::load_all_operands(zbyte specifier) { void Processor::interpret() { do { zbyte opcode; -// debug("%.6x", pcp - zmp); CODE_BYTE(opcode); zargc = 0; |