$OpenBSD: patch-gcc_gcc_c,v 1.1.1.1 2005/01/03 15:21:27 espie Exp $
--- gcc/gcc.c.orig	Thu Apr  1 18:55:17 2004
+++ gcc/gcc.c	Mon Jan  3 10:17:42 2005
@@ -6767,9 +6767,9 @@ used_arg (p, len)
 	 them.  */
       for (i = 0; i < n_mdswitches; i++)
 	{
-	  const char *r;
+	  const char *r, *eq;
 
-	  for (q = multilib_options; *q != '\0'; q++)
+	  for (q = multilib_options, eq = q + strlen(q); q < eq; q++)
 	    {
 	      while (*q == ' ')
 		q++;
