On Mar 21, 8:14 pm, Andrew Plotkin <
zgoo...@eblong.com> wrote:
> Your ptest633.z5 displays the bug. This is the only version that uses
> 6/12pre. As I just mentioned in the intfiction post, I see the same
> problem when compiling with 6/12pre.
Bisecting, the change to the library that results in the change in
behaviour happened in commit 2b2e4f313423fcc41c659fa9be8344d51884827a
"Prevention of buffer overflow in PrefaceByArticle()":
=====
@@ -6489,11 +6491,21 @@ Array StorageForShortName -> WORDSIZE +
SHORTNAMEBUF
#Endif; ! LanguageContractionForms
#Ifdef TARGET_ZCODE;
- if (standard_interpreter ~= 0 && findout) {
- StorageForShortName-->0 = SHORTNAMEBUF_LEN;
+ if (standard_interpreter && findout) {
+ i = (HDR_OBJECTS-->0+124+o*14)-->0; ! Property address of
object
+ findout = 0; ! To find the first char
of the
+ ! object's short-name, we
need
+ ! (worst case) to unpack
the fi
! two words
+ if (i->0 > 2) { ! If more than two
words...
+ i++; ! Start of packed name
+ findout = i-->1; ! Save second word for
restorat
i-->1 = i-->1 | WORD_HIGHBIT; ! then arbitrarily truncate
+ }
@output_stream 3 StorageForShortName;
if (pluralise) print (number) pluralise; else print (PSN__)
o;
@output_stream -3;
+ if (findout) i-->1 = findout; ! Restore truncated short-
name
=====
The problem appears to be that assigning the old value of i-->1 back
into i-->1 isn't un-truncating the name?