From bb3e57a90227e74122d80dd614993cca7d96a73e Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Tue, 4 Jan 2022 07:23:08 -0800 Subject: freeform: bug: account for consumed prefix. This was reported by user vapnik spaknik. The @(freeform), when reconstituting the unmatched trailing portion of the virtual line back into a list of lines, uses the abstract match position, neglecting to account for the fact that a prefix of the line may have been physically consumed to save memory. * match.c (v_freeform): When calling lazy_str_get_trailing_list, indicate the correct amount of prefix material, by subtracting, from the matching length, the base variable, which indicates how much of the prefix had been consumed. This consumption takes place above 4000 bytes, which is why the freeform test cases are not catching this. * tests/006/freeform-5.txr: New file. * tests/006/freeform-5.expected: New file. --- tests/006/freeform-5.expected | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 tests/006/freeform-5.expected (limited to 'tests/006/freeform-5.expected') diff --git a/tests/006/freeform-5.expected b/tests/006/freeform-5.expected new file mode 100644 index 00000000..99433ca3 --- /dev/null +++ b/tests/006/freeform-5.expected @@ -0,0 +1,4 @@ +bar="BAR" +zzy="ZZY" +next="NEXT" +nextnext="NEXTNEXT" -- cgit v1.2.3