Skip to content

#1399: preserve large PMP integers - #1446

Open
gemshrine wants to merge 1 commit into
zerocracy:masterfrom
gemshrine:1399
Open

gemshrine wants to merge 1 commit into
zerocracy:masterfrom
gemshrine:1399

Conversation

@gemshrine

Copy link
Copy Markdown
Contributor

Fixes #1399.

Fbe.pmp used to pass every int setting through Float to check for a fractional part. Float cannot represent every integer above 2^53, so reading a valid setting could silently change it.

Integer inputs now bypass Float conversion, and integer strings are parsed directly. Other numeric inputs still use the whole-number validation. The regression test uses 9_007_199_254_740_993 in the hr.anger setting and checks that the exact value is returned.

test/fbe/test_pmp.rb covers the regression. CI runs the project checks.

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.

Fbe.pmp silently rounds large integer settings through Float

1 participant