Skip to content

Fix invalid GPS record filtering, encoder definition reuse, and integer overflow bugs - #3

Merged
trasch merged 1 commit into
mainfrom
fix/invalid-gps-and-overflow-bugs
Jul 31, 2026
Merged

trasch merged 1 commit into
mainfrom
fix/invalid-gps-and-overflow-bugs

Conversation

@trasch

@trasch trasch commented Jul 31, 2026

Copy link
Copy Markdown
Contributor
  • FITCoder: skip record points where lat/lon == Int32.max (FIT invalid sentinel) to prevent coordinate jumps to 180/180 inflating distances
  • FITDecoder: use unsigned bitPattern for sint16/sint32 to avoid left-shift overflow on negative semicircles (crashes for southern/western hemisphere)
  • FITEncoder: write new definition messages when field layouts change for the same message type
  • FITTypes: clamp semicirclesFromDegrees to Int32 range to avoid overflow at 180
  • SimpleFITTests: suppress #expect(true) always-passing warning

…er overflow bugs

- FITCoder: skip record points where lat/lon == Int32.max (FIT invalid sentinel) to prevent coordinate jumps to 180/180 inflating distances
- FITDecoder: use unsigned bitPattern for sint16/sint32 to avoid left-shift overflow on negative semicircles (crashes for southern/western hemisphere)
- FITEncoder: write new definition messages when field layouts change for the same message type
- FITTypes: clamp semicirclesFromDegrees to Int32 range to avoid overflow at 180
- SimpleFITTests: suppress #expect(true) always-passing warning
@trasch trasch self-assigned this Jul 31, 2026
@trasch trasch added the bug Something isn't working label Jul 31, 2026
@trasch
trasch merged commit 8a1de49 into main Jul 31, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant