freetype-devel
[Top][All Lists]
Advanced

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

Re: FIXED: unaligned access on DEC UNIX compile


From: David Turner
Subject: Re: FIXED: unaligned access on DEC UNIX compile
Date: Thu, 29 Jun 2000 01:45:26 +0200

Thanks a lot Tom,

I've just commited a fix that should work on both 16-bits and 64-bits
systems..

Cheers,

- David

-----Message d'origine-----
De : Tom Kacvinsky <address@hidden>
À : address@hidden <address@hidden>
Date : jeudi 29 juin 2000 09:54
Objet : FIXED: unaligned access on DEC UNIX compile


>Well, the problem wasn't in the grayscale renderer.  It was in
>grx11.c.
>
>Here is a patch.  The unaligned access occured because ulongs on axps
>are 8 bytes wide, but there was a cast to ulong* on a pointer that was
>accessing memory on a 4 byte boundary.
>
>Index: grx11.c
>===================================================================
>RCS file: /cvsroot/freetype2/demos/graph/x11/grx11.c,v
>retrieving revision 1.3
>diff -u -r1.3 grx11.c
>--- grx11.c 2000/05/16 23:44:18 1.3
>+++ grx11.c 2000/06/29 07:48:52
>@@ -429,7 +429,7 @@
>       {
>         byte  color = *_read;
>
>-        *(unsigned long*)_write = surface->color[color].pixel;
>+        *(unsigned int*)_write = surface->color[color].pixel;
>       }
>
>       write += target->pitch;
>
>




reply via email to

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