Re: [AD] [BUG] textprintf in 24 bpp

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Michael Bukin wrote :
> 
> Try the following patch.  I have not tested it, but I'm sure it should
> fix this problem.
> 
> --- old/allegro/src/c/cspr.h    Thu Jun 21 02:31:10 2001
> +++ new/allegro/src/c/cspr.h    Sat Dec 15 23:06:36 2001
> @@ -144,7 +144,7 @@
>          unsigned char *s = src->line[sybeg + y] + sxbeg;
>          PIXEL_PTR d = OFFSET_PIXEL_PTR(bmp_write_line(dst, dybeg + y), dxbeg);
> 
> -        for (x = w - 1; x >= 0; INC_PIXEL_PTR(s), INC_PIXEL_PTR(d), x--) {
> +        for (x = w - 1; x >= 0; s++, INC_PIXEL_PTR(d), x--) {
>             unsigned long c = *s;
>             if (c != 0) {
>                c = table[c];
> @@ -160,7 +160,7 @@
>          unsigned char *s = src->line[sybeg + y] + sxbeg;
>          PIXEL_PTR d = OFFSET_PIXEL_PTR(dst->line[dybeg + y], dxbeg);
> 
> -        for (x = w - 1; x >= 0; INC_PIXEL_PTR(s), INC_PIXEL_PTR(d), x--) {
> +        for (x = w - 1; x >= 0; s++, INC_PIXEL_PTR(d), x--) {
>             unsigned long c = *s;
>             if (c != 0) {
>                c = table[c];
> 

You are right. Your patch fixes the problem.
Thanks !

	Bertrand.



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/