lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LYNX-DEV fixed bug on bsdi


From: T.E.Dickey
Subject: Re: LYNX-DEV fixed bug on bsdi
Date: Thu, 25 Dec 1997 16:39:35 -0500 (EST)

> 
> Well I didn't intend to spend Christmas debugging lynx, but
> I have fixed the problem on bsdi.
thanks (I'm debugging a different program ;-).
 
> The problem was that the value of a local array (replace_buf[] in
> LYFullyTranslateString_1()) was being used before being initialized.
> The code in this function is quite harry, and I'm not really sure what
> it's supposed to do, but looking at the trace output I'm wondering of it's
> really appropriate to call this function here in the first place.
> 
> I consider my fix (see below) to be a stopgap measure.
> This code needs to be scanned with a fine toothed comb, if not rewritten.
will review, etc.  (maybe I'll see a better fix, now that you've isolated
the problem, maybe I won't).
 
> please apply this patch to the latest ac.
> (Fote may also want to pick it up, if he has this function i his code.)
> 
> Thanks and Merry Christmas.
> --le
> 
> *** old/LYCharUtils.c Tue Dec 23 15:02:42 1997
> --- src/LYCharUtils.c Thu Dec 25 14:52:42 1997
> ***************
> *** 1062,1067 ****
> --- 1062,1069 ----
>       */
>       if (!str || *str == NULL || **str == '\0')
>           return str;
> +     for ( i = 0; i < 64; ++i )
> +     replace_buf[i] = '\0';
>       /*
>       **  Don't do byte translation
>       **  if original AND target character sets
> ***************
> *** 1143,1149 ****
>               HTChunkPuts(CHUNK, s); \
>               qs = q = *str
>   
> ! #define REPLACE_CHAR(c) if (q > p) { \
>               HTChunkPutb(CHUNK, qs, q-qs); \
>               qs = q = *str; \
>               *q++ = c; \
> --- 1145,1152 ----
>               HTChunkPuts(CHUNK, s); \
>               qs = q = *str
>   
> ! #define REPLACE_CHAR(c) \
> !         if (q > p) { \
>               HTChunkPutb(CHUNK, qs, q-qs); \
>               qs = q = *str; \
>               *q++ = c; \
> 


-- 
Thomas E. Dickey
address@hidden
http://www.clark.net/pub/dickey

reply via email to

[Prev in Thread] Current Thread [Next in Thread]