[svn-commits] tilghman: trunk r421 - /trunk/menuselect.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Dec 1 15:17:20 CST 2008


Author: tilghman
Date: Mon Dec  1 15:17:19 2008
New Revision: 421

URL: http://svn.digium.com/view/menuselect?view=rev&rev=421
Log:
Kill newlines before evaluating whether a string is empty

Modified:
    trunk/menuselect.c

Modified: trunk/menuselect.c
URL: http://svn.digium.com/view/menuselect/trunk/menuselect.c?view=diff&rev=421&r1=420&r2=421
==============================================================================
--- trunk/menuselect.c (original)
+++ trunk/menuselect.c Mon Dec  1 15:17:19 2008
@@ -530,6 +530,11 @@
 		char *name, *cur, *prev, *p;
 		int val;
 
+		/* Strip trailing CR/NL */
+		while ((p = strchr(buf, '\r')) || (p = strchr(buf, '\n'))) {
+			*p = '\0';
+		}
+
 		p = buf;
 		name = strsep(&p, "=");
 




More information about the svn-commits mailing list