[elinks-dev] Re: [ELinks] elinks - miciah: In register_led, fail not only when |num...

Miciah D.B. Masters miciah at myrealbox.com
Wed Jun 16 01:53:27 PDT 2004


On 20040616 09:42:02, Zas <zas at norz.org> wrote:
> On Wed, Jun 16, 2004 at 05:59:01AM -0000, ELinks cvs wrote:
> > In register_led, fail not only when |number >= LEDS_COUNT| but also when |number > LEDS_COUNT|. LEDs are indexed from 0.
> 
> Are you sure ?
>
> > ---- Files affected:
> > 
> > elinks/src/bfu:
> >    leds.c (1.50 -> 1.51) 
> >     http://cvsweb.elinks.or.cz/cvsweb.cgi/elinks/src/bfu/leds.c.diff?r1=1.50&r2=1.51&f=u
> > 
> > 
> > ---- Diffs:
> > 
> >  elinks/src/bfu/leds.c |    2 +-
> >  1 files changed, 1 insertion(+), 1 deletion(-)
> > 
> > 
> > Index: elinks/src/bfu/leds.c
> > diff -u elinks/src/bfu/leds.c:1.50 elinks/src/bfu/leds.c:1.51
> > --- elinks/src/bfu/leds.c:1.50	Thu May 20 14:42:43 2004
> > +++ elinks/src/bfu/leds.c	Wed Jun 16 07:58:56 2004
> > @@ -262,7 +262,7 @@
> >  struct led *
> >  register_led(struct session *ses, int number)
> >  {
> > -	if (number >= LEDS_COUNT || number < 0)
> > +	if (number > LEDS_COUNT || number < 0)
> >  		return NULL;
> 
> 	if (number < 0 || number >= LEDS_COUNT)
> 		return NULL;
> 
> >  
> >  	if (ses->status.leds.leds[number].__used)
> > 

Sorry, that was stupid of me. I'll revert it soon.

 -- Miciah <miciah at myrealbox.com>



More information about the elinks-dev mailing list