[svn-commits] seanbright: editline/trunk r162 - /editline/trunk/parse.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sat Mar 20 12:13:28 CDT 2010


Author: seanbright
Date: Sat Mar 20 12:13:25 2010
New Revision: 162

URL: http://svnview.digium.com/svn/thirdparty?view=rev&rev=162
Log:
Commit the same crash fix from yesterday.

Modified:
    editline/trunk/parse.c

Modified: editline/trunk/parse.c
URL: http://svnview.digium.com/svn/thirdparty/editline/trunk/parse.c?view=diff&rev=162&r1=161&r2=162
==============================================================================
--- editline/trunk/parse.c (original)
+++ editline/trunk/parse.c Sat Mar 20 12:13:25 2010
@@ -254,10 +254,10 @@
 protected int
 parse_cmd(EditLine *el, const char *cmd)
 {
-	el_bindings_t *b;
-
-	for (b = el->el_map.help; b->name != NULL; b++)
-		if (strcmp(b->name, cmd) == 0)
-			return (b->func);
+	el_bindings_t *bp, *ep;
+	ep = &el->el_map.help[el->el_map.nfunc];
+	for (bp = el->el_map.help; bp < ep; bp++)
+		if (strcmp(bp->name, cmd) == 0)
+			return (bp->func);
 	return (-1);
 }




More information about the svn-commits mailing list