Diff
Not logged in

Differences From:

File src/merge3.c part of check-in [36b96b8616] - Rework the merge algorithm. It now only works for text files. But, it no longer gets confused by line endings (\r\n versus \n) and it reports conflicts. by drh on 2007-11-16 20:42:31. [view]

To:

File src/merge3.c part of check-in [ba9af9aced] - Fix the merge conflict detection. by drh on 2007-11-29 00:37:41. Also file src/merge3.c part of check-in [d0305b305a] - Merged mainline into my branch to get the newest application. by aku on 2007-12-05 08:07:46. [view]

@@ -50,10 +50,10 @@
 static int sameLine(Blob *pV1, Blob *pV2){
   char *z1, *z2;
   int i;
 
-  z1 = blob_buffer(pV1);
-  z2 = blob_buffer(pV2);
+  z1 = &blob_buffer(pV1)[blob_tell(pV1)];
+  z2 = &blob_buffer(pV2)[blob_tell(pV2)];
   for(i=0; z1[i]!='\n' && z1[i]==z2[i]; i++){}
   return z2[i]=='\n' || (z2[i]=='\r' && z2[i+1]=='\n')
           || (z1[i]=='\r' && z2[i]=='\n' && z1[i+1]=='\n');
 }