aboutsummaryrefslogtreecommitdiffstats
path: root/nick.c
diff options
context:
space:
mode:
authordequis <dx@dxzone.com.ar>2015-05-30 21:11:20 -0300
committerdequis <dx@dxzone.com.ar>2015-05-30 21:11:20 -0300
commit0f7eccff5b3f7436f50c66e4270009fa6290a578 (patch)
tree6bb388836ad43e2beea4880082b0728201c09772 /nick.c
parentc42d9916663ecae98d01c539cf038d9bc99acfbb (diff)
parentf453a7faa95f9210adbdba20644f280cce68c42e (diff)
Merge branch 'develop'
Diffstat (limited to 'nick.c')
-rw-r--r--nick.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/nick.c b/nick.c
index fb84f986..31cf4f34 100644
--- a/nick.c
+++ b/nick.c
@@ -367,9 +367,13 @@ int nick_lc(irc_t *irc, char *nick)
int i;
if (tab['A'] == 0) {
+ /* initialize table so nonchars are mapped to themselves */
+ for (i = 0; i < sizeof(tab); i++) {
+ tab[i] = i;
+ }
+ /* replace uppercase chars with lowercase chars */
for (i = 0; nick_lc_chars[i]; i++) {
tab[(int) nick_uc_chars[i]] = nick_lc_chars[i];
- tab[(int) nick_lc_chars[i]] = nick_lc_chars[i];
}
}