Repository navigation
Zero new columns in the fp3/fp5 value reader; document leading-space removal - #30
Merged
Merged
Conversation
When the column array grew, the new entries were left uninitialized, unlike in the fp7/fmp12 reader and in fmp_list_columns. A column whose name chunk was missing then had a random index and name, so the "no name found" check could pass and garbage reach the value handler. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
convert() strips leading spaces from every value and name, which was not mentioned anywhere. In a set of real fp5 files this affects about 0.05% of all values, mostly right-aligned quantities and fields built by concatenation, and turns values made only of spaces into empty strings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The initialization range is correct and the documentation matches the conversion behavior.
Review effort: Balanced
Findings: None
What changed in this PR
Initializes newly allocated fp3/fp5 column entries and documents text normalization behavior.
Changes:
- Zeroes newly allocated column metadata.
- Documents leading-space removal for names and values.
| File | Description |
|---|---|
src/read_values.c |
Initializes expanded column-array entries. |
README.md |
Documents UTF-8 conversion and space trimming. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Summary
fmp_list_columns. A column whose name chunk was missing then had a random index and name, so the "no name found" check could pass and garbage could reach the value handler.convert()strips leading spaces from every value and name, and a value that consists only of spaces comes out empty. This was not mentioned anywhere; the README now says so.Testing
test/data(except the-unshuffledfiles, which do not open). Together with the memory changes from the companion PR, it is also byte-identical for 104 private fp5 files.-Wall -Werror -pedantic-errors.