Skip to content

panel-run-dialog: fix endless loop in remove_parameters

Alberts Muktupāvels requested to merge wip/muktupavels/issue-17 into master

https://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#exec-variables

According to specification double %% are used to escape literal percentage character. In this case first percentage is removed and then strstr returns pointer to literal percentage. If this percentage + next alpha character does not make recognized field code we enter endless loop.

Rewrite function to properly handle literal percentage character and at the same time rename function to remove_field_codes as it seems more appropriate name for what it is doing.

#17 (closed)

Edited by Alberts Muktupāvels

Merge request reports