[gcompris-devel] Gletters bug: non portable pointer conversion

Bruno Coudoin bruno.coudoin at free.fr
Mon Oct 14 05:21:01 UTC 2002


Great, this is commited to the cvs

Bruno.

Le dim 13/10/2002 à 23:43, Christof Petig a écrit :
> Hello Bruno,
> 
> since I was rather frustrated that gletters did not recognize any typed 
> letter on my iBook, I dived into the code and found an endianness bug.
> 
> You store the character in an integer, take a pointer to it and cast it 
> to a char pointer. On any architecture except intel this would select 
> the wrong byte (this highmost byte which has to be 0).
> 
> Please apply the following patch to make gcompris more portable.
> 
> Yours
>     Christof
> 
> ----
> 

> --- gletters.c.orig	2002-10-13 23:36:09.000000000 +0200
> +++ gletters.c	2002-10-13 22:23:58.000000000 +0200
> @@ -186,7 +186,7 @@
>  {
>    gchar *old_value;
>    gchar *old_name;
> -  guint c;
> +  char c;
>  
>    if(!gcomprisBoard)
>      return TRUE;






More information about the Gcompris-devel mailing list