D26811: Fix crash in variable expansion (used by external tools)
This revision was automatically updated to reflect the committed changes. Closed by commit R39:22fa707eb7e2: Fix crash in variable expansion (used by external tools) (authored by dhaumann). REPOSITORY R39 KTextEditor CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D26811?vs=74031=74033 REVISION DETAIL https://phabricator.kde.org/D26811 AFFECTED FILES autotests/src/variable_test.cpp src/utils/katevariableexpansionhelpers.cpp To: dhaumann, cullmann Cc: kwrite-devel, kde-frameworks-devel, rrosch, LeGast00n, GB_2, domson, michaelh, ngraham, bruns, demsking, cullmann, sars, dhaumann
D26811: Fix crash in variable expansion (used by external tools)
cullmann accepted this revision. This revision is now accepted and ready to land. REPOSITORY R39 KTextEditor BRANCH fix-variable-expansion REVISION DETAIL https://phabricator.kde.org/D26811 To: dhaumann, cullmann Cc: kwrite-devel, kde-frameworks-devel, rrosch, LeGast00n, GB_2, domson, michaelh, ngraham, bruns, demsking, cullmann, sars, dhaumann
D26811: Fix crash in variable expansion (used by external tools)
dhaumann created this revision. dhaumann added a reviewer: cullmann. Herald added projects: Kate, Frameworks. Herald added subscribers: kde-frameworks-devel, kwrite-devel. dhaumann requested review of this revision. REVISION SUMMARY findClosing() is already called with +2 to account for the starting %{ characters. So we start at the given pos and increment it only after the while loop. Unbalanced cases of '{' and '}' are now also unit tested. TEST PLAN make && make test REPOSITORY R39 KTextEditor BRANCH fix-variable-expansion REVISION DETAIL https://phabricator.kde.org/D26811 AFFECTED FILES autotests/src/variable_test.cpp src/utils/katevariableexpansionhelpers.cpp To: dhaumann, cullmann Cc: kwrite-devel, kde-frameworks-devel, rrosch, LeGast00n, GB_2, domson, michaelh, ngraham, bruns, demsking, cullmann, sars, dhaumann