mirror of
https://github.com/flatpak/flatpak.git
synced 2026-10-28 02:20:18 -04:00
table-printer: Fix left boundary check in comma-unique cell dedup
In flatpak_table_printer_append_cell_with_comma_unique, the duplicate check only verified the right boundary (match[len] == 0 or comma). This caused false positives: searching for "all" in "superall" matched because the character after "all" happened to be a comma, even though "all" was a substring of "superall", not a separate comma-delimited entry. Calculate the position of each match via pointer arithmetic (match - cell->text) and use cell->text[pos - 1] to check the left boundary, so that a match is only treated as duplicate when it is at the start of the cell or preceded by a comma.
This commit is contained in:
500 Internal Server Error
Gitea Version: 1.28.0+dev-477-g8b6ad49a5f