[MPlayer-cvslog] r32918 - trunk/gui/skin/font.c
    Ingo Brückl 
    ib at wupperonline.de
       
    Thu Feb 17 11:58:40 CET 2011
    
    
  
Nicolas George wrote on Thu, 17 Feb 2011 11:08:22 +0100:
> Why not just uchar[4] = ""?
I should have been able to generalize what I've learned recently about array
initialization. Yes.
> Although, this part of the code seems wrong:
>         p = *str;
>         *str = g_utf8_next_char( *str );
>         strncpy( uchar, p, *str - p );
> A Unicode codepoint can take up to 6 octets in UTF-8.
RFC 3629 restricts UTF-8 to four bytes, doesn't it?
> And uchar seems to be later used as a string, that means an additional
> terminating 0.
As I'm using strncmp(), it's safe.
Ingo
    
    
More information about the MPlayer-cvslog
mailing list