1
0
Bryan Drewery 22 жил өмнө
parent
commit
9aef7d9ec7
2 өөрчлөгдсөн 2 нэмэгдсэн , 2 устгасан
  1. 1 1
      src/botnet.c
  2. 1 1
      src/cmds.c

+ 1 - 1
src/botnet.c

@@ -1459,7 +1459,7 @@ static void dcc_relay(int idx, char *buf, int j)
      escape sequences. */
   if (!(dcc[j].status & STAT_TELNET)) {
     while (*p != 0) {
-      while (*p && *p != 255 && (*p != '\033' || *(p + 1) != '[') && *p != '\r')
+      while (*p != 255 && (*p != '\033' || *(p + 1) != '[') && *p != '\r' && *p)
 	p++;			/* Search for IAC, escape sequences and CR. */
       if (*p == 255) {
 	mark = 2;

+ 1 - 1
src/cmds.c

@@ -768,7 +768,7 @@ static void cmd_nohelp(struct userrec *u, int idx, char *par)
 
   qsort(cmds, cmdi, sizeof(mycmds), (int (*)()) &my_cmp);
   
-  for (i = 0; i < (cmdi - 1); i++) {
+  for (i = 0; i < cmdi; i++) {
     int o, found = 0;
     for (o = 0; (help[o].cmd) && (help[o].desc); o++)
       if (!egg_strcasecmp(help[o].cmd, cmds[i].name)) found++;