Repository navigation
table-printer: Fix left boundary check in comma-unique cell dedup - #6825
Merged
swick merged 1 commit intoSep 22, 2026
Merged
Conversation
swick
requested changes
Sep 18, 2026
Collaborator
|
Please squash the changes. We use clean commit histories here. |
swick
approved these changes
Sep 21, 2026
kylin-liwn
force-pushed
the
fix/table-printer-comma-unique-left-boundary
branch
6 times, most recently
from
September 22, 2026 01:26
fa7a945 to
229a23e
Compare
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.
kylin-liwn
force-pushed
the
fix/table-printer-comma-unique-left-boundary
branch
from
September 22, 2026 01:28
229a23e to
550a8b1
Compare
Author
|
Done! I've squashed the commits and updated the message. Please take another look. |
Collaborator
This doesn't really say what user-facing bug you were fixing with this change, and I had to reverse-engineer it while updating the release notes. In future it would be helpful for MRs that fix a bug to contain a solution-neutral problem statement for what bug is being fixed, or a link to an issue report with a solution-neutral problem statement. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.