[ECOS] catch bug

james chen james_ch1@sina.com
Tue Oct 23 21:04:00 GMT 2001


Hi,
  I have caught a bug in hal/arm/arch/current/src/hal_misc.c. I think that
it haven't been found because nobody called it. change 'i++' to 'i--", is it
right?
Best Regards,
james

-------------------------------------
int
hal_msbindex(int mask)
{
    int i;
    for (i = 32;  i >= 0;  i++) {
                                  ^^^^^^
                                 ==> i--
      if (mask & (1<<i)) return (i);
    }
    return (-1);
}






More information about the Ecos-discuss mailing list