Changeset b95d03b
- Timestamp:
- 2015-03-25T18:50:07Z (10 years ago)
- Branches:
- master
- Children:
- 3dcc878
- Parents:
- 098a75b
- git-author:
- Antoine Pietri <antoine.pietri@…> (11-03-15 10:49:15)
- git-committer:
- dequis <dx@…> (25-03-15 18:50:07)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
irc_im.c
r098a75b rb95d03b 698 698 irc_t *irc = bee->ui_data; 699 699 irc_channel_t *ic = c->ui_data, *oic; 700 char stripped[MAX_NICK_LENGTH + 1], *full_name; 700 char *stripped, *full_name; 701 gsize bytes_written; 701 702 702 703 if (ic == NULL) { … … 709 710 } 710 711 711 strncpy(stripped, name, MAX_NICK_LENGTH); 712 stripped[MAX_NICK_LENGTH] = '\0'; 712 stripped = g_convert_with_fallback(name, -1, "ASCII//TRANSLIT", "UTF-8", "", NULL, &bytes_written, NULL); 713 if (bytes_written > MAX_NICK_LENGTH) { 714 stripped[MAX_NICK_LENGTH] = '\0'; 715 } 716 713 717 irc_channel_name_strip(stripped); 714 718 if (set_getbool(&bee->set, "lcnicks")) { … … 717 721 718 722 if (stripped[0] == '\0') { 723 g_free(stripped); 719 724 return FALSE; 720 725 } 721 726 722 727 full_name = g_strdup_printf("#%s", stripped); 728 g_free(stripped); 723 729 if ((oic = irc_channel_by_name(irc, full_name))) { 724 730 char *type, *chat_type;
Note: See TracChangeset
for help on using the changeset viewer.