Inform - Support - Patches

About Patches  

Compiler  
Library  

DM4 Errata  

Issue C62115

@ escapes are incorrectly handled in strings
Submitted by: Kevin Bracey     Appeared in: Compiler 6.21 or before     Fixed in: Compiler 6.30
Problem

There are several problems:

  • @@32 outputs a garbled Z-character sequence, rather than a space.
  • @@ with any number less than 256 is treated as that character from the source ("ISO") character set, rather than that ZSCII code. Values of 256 or greater are treated as ZSCII codes, and for values less than 128 the error doesn't matter.
  • Escape sequences giving non-ASCII characters (eg @@169, @'a or @{E1}) are always output as a 4 Z-character sequence, even if the requested character is in the alphabet table (in which case it should occupy 1 or 2 Z-characters).

In some cases the escape sequence may even output the wrong character altogether, if other accented characters are in the alphabet table.

Solution

Apply this patch:

  --- chars.c~  Wed Apr 28 21:14:39 1999
  +++ chars.c   Sat Nov 24 09:41:28 2001
  @@ -173,7 +173,7 @@
           }
       }
       for (j=0; j<3; j++)
  -        for (k=0; k<26; k++)
  +        for (k=(j<2?0:1); k<26; k++)
           {   i=(int) ((alphabet[j])[k]);
               zscii_to_alphabet_grid[i] = k + j*26;
               iso_to_alphabet_grid[zscii_to_iso_grid[i]] = k + j*26;
  --- text.c~  Wed Apr 28 21:17:59 1999
  +++ text.c   Sat Nov 24 17:01:54 2001
  @@ -229,7 +229,12 @@
   {
       int lookup_value, in_alphabet;

  -    if (zsc < 0x100) lookup_value = iso_to_alphabet_grid[zsc];
  +    if (zsc==' ')
  +    {   write_z_char(0);
  +        return;
  +    }
  +
  +    if (zsc < 0x100) lookup_value = zscii_to_alphabet_grid[zsc];
       else lookup_value = -1;

       if (lookup_value >= 0)


Last updated 17 April 2013. This site is no longer supported; information may be out of date.
Maintained as a historical archive by the Interactive Fiction Technology Foundation. Copyright 1993-2018 IFTF, CC-BY-SA unless otherwise noted.
This page was originally managed by Roger Firth.