patch to simil.c
Stephen Goldschmidt
aluko at portia.Stanford.EDU
Fri Mar 2 08:01:13 AEST 1990
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 at portia.Stanford.EDU
More information about the Alt.sources.patches
mailing list