[NeoStats-Devel] [Commits] r2629 - trunk/src

[email protected]
Newsgroups gmane.comp.neostats.devel
Message-ID <[email protected]>
Author: Mark
Date: Sat May 28 05:37:07 2005
New Revision: 2629

Modified:
   trunk/src/bots.c
Log:
fix accidental removal of array check

Modified: trunk/src/bots.c
==============================================================================
--- trunk/src/bots.c	(original)
+++ trunk/src/bots.c	Sat May 28 05:37:07 2005
@@ -552,13 +552,13 @@
 {
 	/* find free nick from Bot nick */
 	/* if room, add random number between 0 and 9 */
-	if( ( stublen ) < MAXNICK )
+	if( ( stublen + 1 ) < MAXNICK )
 	{
 		nickbuf[stublen++] = ( ( rand() % 10 ) + 48 );
 		nickbuf[stublen] = '\0';
 	}
 	/* if room, add random letter */
-	if( ( stublen ) < MAXNICK )
+	if( ( stublen + 1 ) < MAXNICK )
 	{
 		nickbuf[stublen++] = ( ( rand() % 26 ) + 97 );
 		nickbuf[stublen] = '\0';
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.