Changeset 7d31002 for irc.c


Ignore:
Timestamp:
2006-03-31T21:09:36Z (18 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
e6e1f18
Parents:
e27661d
Message:

Tested and fixed one issue, and got rid of one more superfluous iconv call.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • irc.c

    re27661d r7d31002  
    355355                for( i = 0; *lines[i] != '\0'; i ++ )
    356356                {
     357                        char conv[IRC_MAX_LINE+1];
     358                       
    357359                        /* [WvG] Because irc_tokenize splits at every newline, the lines[] list
    358360                            should end with an empty string. This is why this actually works.
     
    367369                        }
    368370                       
    369                         if( ( cs = set_getstr( irc, "charset" ) ) )
     371                        if( ( cs = set_getstr( irc, "charset" ) ) && ( g_strcasecmp( cs, "utf-8" ) != 0 ) )
    370372                        {
    371                                 char conv[IRC_MAX_LINE+1];
    372                                
    373373                                conv[IRC_MAX_LINE] = 0;
    374374                                if( do_iconv( cs, "UTF-8", lines[i], conv, 0, IRC_MAX_LINE - 2 ) != -1 )
    375                                         strcpy( lines[i], conv );
     375                                        lines[i] = conv;
    376376                        }
    377377                       
     
    588588       
    589589        strip_newlines( line );
    590         if( ( cs = set_getstr( irc, "charset" ) ) )
     590        if( ( cs = set_getstr( irc, "charset" ) ) && ( g_strcasecmp( cs, "utf-8" ) != 0 ) )
    591591        {
    592592                char conv[IRC_MAX_LINE+1];
Note: See TracChangeset for help on using the changeset viewer.