[ircd-ratbox] getfield problem

Dustin Marquess jailbird at alcatraz.fdf.net
Tue Nov 29 15:09:59 UTC 2005


In the latest svn copy of the RATBOX_2_1 tree, getfield() seems to have 
an off-by-1 problem that makes it skip the last field of every line. 
This should fix it.

-Dustin
-------------- next part --------------
--- RATBOX_2_1/src/kdparse.c	Sun Oct 16 19:05:42 2005
+++ RATBOX_2_1.new/src/kdparse.c	Tue Nov 29 08:46:48 2005
@@ -279,7 +279,7 @@
 		/* no trailing , - last field */
 		if(end == NULL)
 		{
-			end = line + strlen(line);
+			end = line + strlen(line) - 1;
 			line = NULL;
 
 			if(*end == '"')


More information about the ircd-ratbox mailing list