Skip to content

Zero new columns in the fp3/fp5 value reader; document leading-space removal - #30

Merged
evanmiller merged 2 commits into
evanmiller:mainfrom
ChrisWaschl:small-fixes
Oct 7, 2026
Merged

evanmiller merged 2 commits into
evanmiller:mainfrom
ChrisWaschl:small-fixes

Conversation

@ChrisWaschl

Copy link
Copy Markdown
Contributor

Summary

  • Zero new columns in the fp3/fp5 value reader. 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 could reach the value handler.
  • Document that leading spaces are removed. 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

  • JSON output is byte-identical for all test files in test/data (except the -unshuffled files, which do not open). Together with the memory changes from the companion PR, it is also byte-identical for 104 private fp5 files.
  • The library builds with -Wall -Werror -pedantic-errors.

ChrisWaschl and others added 2 commits October 7, 2026 08:14
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>
Copilot AI balanced review requested due to automatic review settings October 7, 2026 06:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@evanmiller
evanmiller merged commit 9039e19 into evanmiller:main Oct 7, 2026
5 of 7 checks passed
@ChrisWaschl
ChrisWaschl deleted the small-fixes branch October 8, 2026 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants