CVSROOT    : /home/coder-com/cvs
Module     : ircu2.10
Branch tags: u2_10_11
Commit time: 2002-08-09 16:28:51 UTC

Modified files:
  Tag: u2_10_11
     ChangeLog ircd/random.c

Log message:

Author: Kev <[EMAIL PROTECTED]>
Log message:

Fix a very minor bug in memxor() in random.c.

---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.290.2.110 ircu2.10/ChangeLog:1.290.2.111
--- ircu2.10/ChangeLog:1.290.2.110      Tue Aug  6 05:55:55 2002
+++ ircu2.10/ChangeLog  Fri Aug  9 11:28:41 2002
@@ -1,3 +1,8 @@
+2002-08-09  Kevin L Mitchell  <[EMAIL PROTECTED]>
+
+       * ircd/random.c (memxor): oops, off by one error would keep the
+       algorithm from touching the first byte of the string
+
 2002-08-05  Zoot <[EMAIL PROTECTED]>
         
        * ircd/ircd_snprintf.c: Reorder the tests in the adds() while loop
Index: ircu2.10/ircd/random.c
diff -u ircu2.10/ircd/random.c:1.5 ircu2.10/ircd/random.c:1.5.2.1
--- ircu2.10/ircd/random.c:1.5  Sat Apr 21 16:49:13 2001
+++ ircu2.10/ircd/random.c      Fri Aug  9 11:28:41 2002
@@ -15,7 +15,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: random.c,v 1.5 2001/04/21 21:49:13 kev Exp $
+ * $Id: random.c,v 1.5.2.1 2002/08/09 16:28:41 kev Exp $
  */
 #include "config.h"
 
@@ -82,7 +82,7 @@
   unsigned char *d = (unsigned char *)dest;
   unsigned char *s = (unsigned char *)src;
 
-  while (--n)
+  while (n--)
     d[n] ^= s[n];
 }
 
----------------------- End of diff -----------------------

Reply via email to