Author: stefan2
Date: Sat Mar 3 10:53:16 2012
New Revision: 1296596
URL: http://svn.apache.org/viewvc?rev=1296596&view=rev
Log:
* subversion/libsvn_delta/xdelta.c
(reverse_match_length): actually return MAX_LEN if MAX_LEN chars match.
Found by: julianfoad
Modified:
subversion/trunk/subversion/libsvn_delta/xdelta.c
Modified: subversion/trunk/subversion/libsvn_delta/xdelta.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_delta/xdelta.c?rev=1296596&r1=1296595&r2=1296596&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_delta/xdelta.c (original)
+++ subversion/trunk/subversion/libsvn_delta/xdelta.c Sat Mar 3 10:53:16 2012
@@ -260,11 +260,15 @@ reverse_match_length(const char *a, cons
#endif
+ /* If we find a mismatch at -pos, pos-1 characters matched.
+ */
while (++pos <= max_len)
if (a[0-pos] != b[0-pos])
- break;
+ return pos - 1;
- return pos-1;
+ /* No mismatch found -> at least MAX_LEN machting chars.
+ */
+ return max_len;
}