Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!emory!hubcap!shelby!portia!aluko From: aluko@portia.Stanford.EDU (Stephen Goldschmidt) Newsgroups: alt.sources.patches Subject: patch to simil.c Keywords: pattern matching by gestalt Message-ID: <9683@portia.Stanford.EDU> Date: 1 Mar 90 21:01:13 GMT Sender: Stephen Goldschmidt Organization: Stanford University Lines: 22 This patch is intended to fix a bug in simil.c that allows characters to be counted twice in GCsubstr. *** simil.c Fri Jan 19 11:25:14 1990 --- simil2.c Thu Mar 1 12:58:41 1990 *************** *** 51,55 if( *a1 == *a2 ) { /* determine length of common substring */ ! for( i = 1; a1[i] && (a1[i] == a2[i]); i++ ) ; if( i > max ) { --- 51,56 ----- if( *a1 == *a2 ) { /* determine length of common substring */ ! for( i = 1; a1+i < end1 && a2+i < end2 && ! a1[i] == a2[i]; i++ ) ; if( i > max ) { -- Stephen Goldschmidt, aluko@portia.Stanford.EDU