Inform - Support - Patches

About Patches  

Compiler  
Library  

DM4 Errata  

Issue C63112     [previous patch]

Exactly 64Kb of readable memory gives corrupt game
Submitted by: Charles Masden     Appeared in: Compiler 6.31 or before     Fixed in: -
Problem

In construct_storyfile_z() (table.c), we find this code:

  if (mark > 0x10000)
   {   error("This program has overflowed the maximum readable-memory \
       size of the Z-machine format. [...]

But the test should actually be

  if (mark > 0x0FFFE)

The values 0x10000 and 0xFFFF both fail. The mark value gets copied into Write_Code_At. Then the header value for the initial PC (a two-byte field) is set to Write_Code_At+1. If that reaches 0x10000, the header value is bunk and the game file is unrunnable.

Solution

See above.


Last updated 2 May 2008. The librarian in charge of this page is Roger Firth. Please email any comments, suggestions or corrections to roger@firthworks.com.