On Thu, Apr 22, 2010 at 10:53:38AM +0200, Eric Faurot wrote:

> +     n = sio_read(hdl, b, max * BPS);
> +     while (n % BPS) {
> +             t = sio_read(hdl, b + n, n % BPS);
> +             if (t == 0)
> +                     return AD_ERR_GEN;
> +             n += t;
> +     }

Duh! I failed again. It doesn't change anything because BPS is 2,
but it should be:

        t = sio_read(hdl, b + n, BPS - (n % BPS));

Eric.

Reply via email to