go-diff icon indicating copy to clipboard operation
go-diff copied to clipboard

fix panic: runtime error: slice bounds out of range

Open iambus opened this issue 4 years ago • 5 comments

This PR should fix #127

The new code uses same implementation as the Java version: https://github.com/google/diff-match-patch/blob/62f2e689f498f9c92dbc588c58750addec9b1654/java/src/name/fraser/neil/plaintext/diff_match_patch.java#L545 https://github.com/google/diff-match-patch/blob/62f2e689f498f9c92dbc588c58750addec9b1654/java/src/name/fraser/neil/plaintext/diff_match_patch.java#L568

iambus avatar Dec 13 '21 09:12 iambus

Any updates on getting this merged? Ran into same panic as reported in #127

meghb avatar Feb 10 '22 20:02 meghb

@iambus Thank you! still waiting for a merge.

dokudoki avatar Mar 26 '22 00:03 dokudoki

One of the unit-tests (TestDiffCharsToLines) panics with this change

michelpapi avatar Mar 28 '22 18:03 michelpapi

One of the unit-tests (TestDiffCharsToLines) panics with this change

Tests were updated.

iambus avatar Sep 26 '22 17:09 iambus