Browse Source

* Fix segfault with new 'set altchars'

svn: 3814
Bryan Drewery 18 years ago
parent
commit
62a5c72181
3 changed files with 3 additions and 3 deletions
  1. 1 1
      src/mod/server.mod/servmsg.c
  2. 1 1
      src/set.c
  3. 1 1
      src/set.h

+ 1 - 1
src/mod/server.mod/servmsg.c

@@ -20,7 +20,7 @@ static void rotate_nick(char *nick, char *orignick)
   int use_chr = 1;
 
   /* First run? */
-  if (altnick_char == 0 && !rolls) {
+  if (altnick_char == 0 && !rolls && altchars[0]) {
     altnick_char = altchars[0];
     /* the nick is already as long as it can be. */
     if (len == (unsigned) nick_len) {

+ 1 - 1
src/set.c

@@ -22,7 +22,7 @@
 
 #include "set_default.h"
 
-char *altchars = NULL;
+char altchars[50] = "";
 char alias[1024] = "";
 bool auth_chan;
 char auth_key[51] = "";

+ 1 - 1
src/set.h

@@ -64,7 +64,7 @@ typedef struct rate_b {
 
 extern char		auth_key[], auth_prefix[2], motd[], *def_chanset, alias[],
 			msgident[], msginvite[], msgop[], msgpass[],
-                        homechan[], *altchars;
+                        homechan[], altchars[];
 extern bool		dccauth, auth_obscure, manop_warn, auth_chan, oidentd, ident_botnick, irc_autoaway;
 extern int		cloak_script, fight_threshold, fork_interval, in_bots, set_noshare, dcc_autoaway,
 			kill_threshold, lag_threshold, op_bots, hijack, login, promisc, trace,