diff-match-patch icon indicating copy to clipboard operation
diff-match-patch copied to clipboard

Failed assertion during match call

Open RaimundWege opened this issue 6 years ago • 0 comments

The following code throws an exception:

String text = "schoener wohnen in altona? stadtentwicklung im 20. und 21. jahrhundert";
String query = "auf motivsuche im kraftwerk bille";
DiffMatchPatch().match(text, query, 0);

The exception is:

flutter: 'package:diff_match_patch/src/match.dart': Failed assertion: line 105 pos 10: 'BITS_PER_INT == 0 ||
flutter: pattern.length <= BITS_PER_INT': is not true.

It seems that the query shouldn't be longer than 32 chars.

RaimundWege avatar Apr 16 '19 07:04 RaimundWege