Tom, please don't use the TRSTable.c part of this patch
(http://www.flora.org/lynx-dev/html/month1199/msg00529.html),
but do use the GridText.c part.

The TRSTable.c patch is broken, I'll send a better one.

    Klaus

On Mon, 22 Nov 1999, John Bley wrote:

> * Fix an array boundary accident in GridText.c - JB
> * Fix an uninitialized member in TRSTable.c - KW, JB
> 
> On the first one, I'm not entirely sure if the original intent behind
> checking the next character was correct, but this patch at least
> ensures that the next character is 'there'.

(The original intent might be better expressed as
 IsSpecialAttrChar(line->data[0]) .)

> [patch attached for ease of patching]
> 
> diff -Burp lynx2-8-3/src/GridText.c lynx2-8-3-patched/src/GridText.c
> --- lynx2-8-3/src/GridText.c  Wed Nov 17 23:08:08 1999
> +++ lynx2-8-3-patched/src/GridText.c  Mon Nov 22 07:16:14 1999
> @@ -7345,8 +7345,10 @@ PUBLIC void print_wwwfile_to_fd ARGS2(
> 
>      line = HTMainText->last_line->next;
>      for (;; line = line->next) {
> -     if (!first
> -      && line->data[0] != LY_SOFT_NEWLINE && line->data[1] != LY_SOFT_NEWLINE)
> {
> +     if (!first &&
> +      line->data[0] != LY_SOFT_NEWLINE &&
> +      line->data[0] != '\0' &&
> +      line->data[1] != LY_SOFT_NEWLINE) {
>           /* data[0] can be LY_*START_CHAR, so LY_SOFT_NEWLINE can be in [1] -
> VH */
>           fputc('\n',fp);
>           /*
> diff -Burp lynx2-8-3/src/TRSTable.c lynx2-8-3-patched/src/TRSTable.c
> --- lynx2-8-3/src/TRSTable.c  Wed Nov 17 23:08:08 1999
> +++ lynx2-8-3-patched/src/TRSTable.c  Mon Nov 22 06:52:56 1999
> @@ -447,6 +447,7 @@ PRIVATE int Stbl_addCellToRow ARGS9(
>       me->cells[i].alignment = HT_LEFT;
>      }
>      me->cells[me->ncells + colspan].pos = -1; /* not yet used */
> +    me->cells[me->ncells + colspan].alignment = HT_ALIGN_NONE;
>      me->ncells++;
>      return (me->ncells - 1);
>  }
> 
> 
> 

Reply via email to