Fix for bug #70.

I am a little skeptical about this patch, because somehow
the file had the TXT_ISEXT flag set in it, and the support for
that feature isn't complete. What I want to know is how that
flag got set in the first place, none of the interface code
turns it on.

At least it fixes the crash.
This commit is contained in:
2003-03-25 15:54:46 +00:00
parent dbb49fd378
commit cdb2974b67

View File

@@ -1661,33 +1661,31 @@ static void direct_link_text(FileData *fd, Text *text)
text->compiled= NULL;
/*
if(text->flags & TXT_ISEXT) {
/* not implemented yet... */
/* reopen_text(text); */
reopen_text(text);
} else {
*/
if(text->lines.first==0) return;
link_list(fd, &text->lines);
link_list(fd, &text->lines);
text->curl= newdataadr(fd, text->curl);
text->sell= newdataadr(fd, text->sell);
text->curl= newdataadr(fd, text->curl);
text->sell= newdataadr(fd, text->sell);
ln= text->lines.first;
while(ln) {
ln->line= newdataadr(fd, ln->line);
ln= text->lines.first;
while(ln) {
ln->line= newdataadr(fd, ln->line);
if (ln->len != (int) strlen(ln->line)) {
printf("Error loading text, line lengths differ\n");
ln->len = strlen(ln->line);
}
ln= ln->next;
if (ln->len != (int) strlen(ln->line)) {
printf("Error loading text, line lengths differ\n");
ln->len = strlen(ln->line);
}
text->flags |= TXT_ISTMP;
ln= ln->next;
}
text->flags = (text->flags|TXT_ISTMP) & ~TXT_ISEXT;
text->id.us= 1;
}