It seems that the construct obj.prop can crash at run-time;
it should complain if either obj or prop is too large. And usually does regardless of whether Strict mode is on or off.
The crash arises when 16384 <= prop < 32768, and the superclass
implementation in veneer routine RA__Pr is triggered: Inserting at this point will usually stop the routine returning a bogus address,
and result in an only slightly misleading error That could be fixed by putting a similar check in Print__PName, so it
reads I haven't checked whether the superclass operator still works perfectly,
but it should. I also wonder whether the check in RA__Pr a few lines
earlier needs something similar, and what happens with the superclass
operator when the property number is greater than 255.
About Patches
Issue C63008 [previous patch]
Construct obj.prop crashes for large prop values
Submitted by: Roger Firth
Appeared in: Compiler 6.30 or before
Fixed in: -
Problem
Solution (by Cedric Knight)
if (identifier & $4000 ~= 0)\
{ cla = #classes_table-->(identifier & $ff);\
if (cla > #largest_object-255 || cla < 1 || cla notin Class) rfalse;\
[**Programming error: thing (object number 5) has no property
(string at 1318)::<number 2> (and nor has any other object) to send message
cla = #classes_table-->(prop & $ff);\
if (prop & $c000 && cla <= #largest_object-255 && cla > 0 && cla in Class) {\
print (name) cla, \"::\";\
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.