Thread View: alt.sources.patches
1 messages
1 total messages
Started by Stephen Goldschmidt
Thu, 01 Mar 1990 21:01
patch to simil.c
Author: Stephen Goldschmidt
Date: Thu, 01 Mar 1990 21:01
Date: Thu, 01 Mar 1990 21:01
22 lines
1138 bytes
1138 bytes
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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads