[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdebase/kioslave/man
From:       Nicolas Goutte <nicolasg () snafu ! de>
Date:       2005-12-10 15:58:03
Message-ID: 1134230283.689224.1537.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 487413 by goutte:

Fix off-by-one when trying to find URLs in the text.
(Foreward port of revision 487411; bug #117971; might not compile)


 M  +4 -4      man2html.cpp  


--- trunk/KDE/kdebase/kioslave/man/man2html.cpp #487412:487413
@@ -939,12 +939,12 @@
 	    break;
 	}
 	nr=0;
-	if (idtest[0] && idtest[0]<c) idtest[0]=strstr(c+1,"://");
-	if (idtest[1] && idtest[1]<c) idtest[1]=strchr(c+1,'@');
+	if (idtest[0] && idtest[0]<=c) idtest[0]=strstr(c+1,"://");
+	if (idtest[1] && idtest[1]<=c) idtest[1]=strchr(c+1,'@');
 	if (idtest[2] && idtest[2]<c) idtest[2]=strstr(c,"www.");
 	if (idtest[3] && idtest[3]<c) idtest[3]=strstr(c,"ftp.");
-	if (idtest[4] && idtest[4]<c) idtest[4]=strchr(c+1,'(');
-	if (idtest[5] && idtest[5]<c) idtest[5]=strstr(c+1,".h&gt;");
+	if (idtest[4] && idtest[4]<=c) idtest[4]=strchr(c+1,'(');
+	if (idtest[5] && idtest[5]<=c) idtest[5]=strstr(c+1,".h&gt;");
         for (i=0; i<numtests; i++) nr += (idtest[i]!=NULL);
     }
     output_real(c);
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic