Inform - Support - Patches

About Patches  

Compiler  
Library  

DM4 Errata  

Issue C63018     [previous patch]

Infix "; obj has attr" sometimes fails
Submitted by: 'Poster'     Appeared in: Compiler 6.30 or before     Fixed in: -
Problem

This Infix command doesn't always work:

  ; obj has attr
Solution (by Cedric Knight)

The line in infix.h

  acc = (InfixRV_rvals-->lop) has (InfixRV_rvals-->rop);

generates code which tests the object number to see if it's a valid attribute number, and thus fails for object numbers > 48. Reordering lines ~756-761 of expressc.c to this:

  assemblez_store(temp_var1, AO1);
  assemblez_store(temp_var2, AO2);
  if ((AO2.type == VARIABLE_OT)&&(AO2.value == 0))
      assemblez_store(AO2, temp_var2);
  if ((AO1.type == VARIABLE_OT)&&(AO1.value == 0))
      assemblez_store(AO1, temp_var1);

fixes the problem for Z-code. It's done using @stkpeek for Glulx so there doesn't seem to be a problem there.


Last updated 17 April 2013. This web site has not been fully supported since April 2008. Information may be out of date. This page was originally managed by Roger Firth.