Kaynağa Gözat

* Fix segfault in cmd_mmode (fixes #399)


svn: 3698
Bryan Drewery 18 yıl önce
ebeveyn
işleme
b111218a8d
2 değiştirilmiş dosya ile 2 ekleme ve 1 silme
  1. 1 0
      doc/UPDATES
  2. 1 1
      src/mod/irc.mod/cmdsirc.c

+ 1 - 0
doc/UPDATES

@@ -17,6 +17,7 @@
 * Change default realname to mimic bitchx
 * Make the 'detect login' use less shell resources
 * Fix bot hosts/users being cached internally as wrong, even when a new host is added
+* Fix segfault in cmd_mmode (fixes #399)
 
 1.2.14 - http://wraith.botpack.net/milestone/1.2.14
 * Fix another bug in shell functions. (fixes #321)

+ 1 - 1
src/mod/irc.mod/cmdsirc.c

@@ -617,7 +617,7 @@ static void cmd_mmode(int idx, char *par)
       return;
     }
   }
-  if (!chan || !chname[0]) {
+  if (!chan || !chname || !chname[0]) {
     dprintf(idx, "Usage: mmode <(+|-)MODE> <#channel> <a|o|v|d|r> [bots=n] [alines=n] [slines=n] [overlap=n] [bitch] [simul] [local]\n");
     dprintf(idx, "Ie. mmode -o #chan a\n");
     return;