util: fix parsing of XDG menus with multiple groups
commite037ae3684928a2fbf4a3994562a322f5d3b0c71
authorChristophe CURIS <christophe.curis@free.fr>
Sun, 2 Jul 2017 21:01:49 +0000 (2 23:01 +0200)
committerCarlos R. Mafra <crmafra@gmail.com>
Mon, 3 Jul 2017 13:45:26 +0000 (3 14:45 +0100)
treedfa94e75f2ad9c6438b68ba35070f9f661239d98
parent83f0b764e607306feb7b17026a11034e5cf84785
util: fix parsing of XDG menus with multiple groups

The specification for XDG menu files allows having more than one group and
assumes no constraint on their order. The original code assumed that once
the proper group marker was found, everything after was part of it, causing
misinterpretation of some data, like taking the wrong launch command.

This patch stops the parsing of the menu XDG file when a new group is
found, hence implementing the expected behaviour.

Reported-by: Andreas Metzler <ametzler@bebt.de>
util/wmmenugen_parse_xdg.c