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

Trying to match a long pattern fails

Open adityasaky opened this issue 3 years ago • 0 comments

Hello! I'm working with some longer pattern values, the value I'm currently testing has len(pattern) = ~800. I noticed that the line here: https://github.com/sergi/go-diff/blob/v1.2.0/diffmatchpatch/match.go#L57 causes an overflow beyond the length of the pattern being 64. I'm happy to help contribute fixes here if someone can point me in the right direction. I understand why it's happening but I haven't studied the algorithm yet to see if we can refactor this to accommodate larger patterns.

Thanks!

adityasaky avatar Apr 06 '21 04:04 adityasaky