Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix an incorrect offset in GridTableParser. #834

Merged
merged 1 commit into from
Dec 18, 2024
Merged

Conversation

snnz
Copy link
Contributor

@snnz snnz commented Dec 17, 2024

Instead of the intended index to the table line content, an offset to the global source is used. The resulting offset is beyond the end of the table line, and if there happens to be a bar '|' there, the last character of the line is cut off.

For example:

// 01234567 8 9012345 6 7890123
  "+--+--+\r\n|11|12\r\n>     |"

The start of the second line of the table (9) + the line end (14) is 23, and there is a bar at 23. So this string results in a table containing "11", "1" (not "12").

@xoofx xoofx merged commit b8a3c27 into xoofx:master Dec 18, 2024
1 check passed
@xoofx xoofx added the bug label Dec 18, 2024
@snnz snnz deleted the fix-gridtables branch December 18, 2024 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants