Fix crash in variable expansion (used by external tools)

Authored by dhaumann on Jan 21 2020, 5:12 PM.

Description

Fix crash in variable expansion (used by external tools)

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

Reviewers: cullmann

Reviewed By: cullmann

Subscribers: kwrite-devel, kde-frameworks-devel

Tags: Kate, Frameworks

Differential Revision: https://phabricator.kde.org/D26811

Details

Committed
dhaumannJan 21 2020, 5:28 PM
Reviewer
cullmann
Differential Revision
D26811: Fix crash in variable expansion (used by external tools)
Parents
R39:d47bf03792fc: GIT_SILENT: Adapt timings of message test
Branches
Unknown
Tags
Unknown