[gcompris-devel] gletter bug

Yan Seiner yan at cardinalengineering.com
Wed Mar 24 01:44:24 UTC 2004


Bruno Coudoin wrote:
> I finally found my bug in gletter.
> 
> I replaced;
>   g_unichar_to_utf8 (gdk_keyval_to_unicode(keyval),utf8char);
> 
> By:
>   i = g_unichar_to_utf8 (gdk_keyval_to_unicode(keyval),utf8char);
>   utf8char[i]='\0';
> 
> I fixed several compile warning as well.
> 
> Yan, can you please check it works for you as well.

Bruno:

I wonder if that's a bug in your glibc...  Certainly the gnome docs 
sound like that should not be necessary...  But it can't hurt.

I would also check wordsgame since that's where I lifted that code from. 
  wordgame.c has the following code:

   sprintf(utf8char, "%c", gdk_keyval_to_unicode(keyval));
   g_unichar_to_utf8 (gdk_keyval_to_unicode(keyval),
		     utf8char);

I couldn't find a purpose for the sprintf statement so I got rid of it.

--Yan

-- 
         o
      /\ /_       o__
    o*  ~(_)      ,>/'_      o__
Yan Seiner, PE  (_)\(_)     ,>/'_   o__     o__
Cardinal Engineering, Inc. (_)\(_)  ,>/'_   ,>/'_
http://www.cardinalengineering.com (_)\(_) (_)\(_)
spam killer code kpwq1jkcsEzdx39gnkVvgycd15ayqq





More information about the Gcompris-devel mailing list