You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's an issue with the diff_CleanupMerge function around line 1280. It
attempts to do a .Substring with the start index being outside the range of the
string.
I changed the following line:
} else if (diffs[pointer].text.StartsWith(diffs[pointer + 1].text,
StringComparison.Ordinal)) {
to:
} else if (diffs[pointer].text.StartsWith(diffs[pointer + 1].text,
StringComparison.Ordinal) &&
diffs[pointer + 1].text.Length < diffs[pointer].text.Length) {
to prevent this call from happening:
diffs[pointer].text =
diffs[pointer].text.Substring(diffs[pointer + 1].text.Length)
+ diffs[pointer + 1].text;
Now for all I know, the change I've made could invalidate the patch (I don't
really understand what I'm changing, but I needed to get rid of the exception
that was being thrown at all costs), but I'm guessing based on comments and
that it seems to have a "changes = true;" line in there that it's just doing
some optimizations on patch size and failing.
Original issue reported on code.google.com by [email protected] on 27 May 2013 at 1:12
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
[email protected]
on 27 May 2013 at 1:12The text was updated successfully, but these errors were encountered: