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

Added fix to cfloat_endf for length 11 endf floats #2967

Merged
merged 1 commit into from
Apr 18, 2024

Conversation

aidancrilly
Copy link
Contributor

Description

Fix for issue also found in endf-python (see PR:paulromano/endf-python#7).

Some ENDF files have length 11 floats. E.g. ENDF/B-VIII.0 incident neutron data for deuterium there is -2.225002+6 at the beginning of the MF = 3, MT = 16 record. This is the QM/QI value.

The current float converter has arr length 12 so doesn't have space for both the e and the null terminator. Therefore the above example makes the code crash.

The proposed change is simply to make the arr length 13 to accommodate the length 11 endf floats.

@aidancrilly aidancrilly requested a review from paulromano as a code owner April 18, 2024 15:25
Copy link
Contributor

@paulromano paulromano left a comment

Choose a reason for hiding this comment

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

Thanks once again @aidancrilly!

@paulromano paulromano enabled auto-merge (squash) April 18, 2024 15:27
@paulromano paulromano merged commit d53155d into openmc-dev:develop Apr 18, 2024
17 checks passed
church89 pushed a commit to openmsr/openmc that referenced this pull request Jul 18, 2024
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.

2 participants