forked from tomojitakasu/RTKLIB
-
Notifications
You must be signed in to change notification settings - Fork 235
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
getbits*,setbits*: rewrite to better handle and report edge cases
Change the bit position and lengths to be unsigned values. This avoids having to check if they are negative, and makes it clear that these functions are only intended to be used with non-negative bit positions and lengths. Check and report bit lengths that are out of range. Better handle some edge cases, such as lengths being zero. Avoid left shits of unsigned integers which is 'undefined behaviour'.
- Loading branch information
1 parent
2eaba97
commit 6f37fd3
Showing
3 changed files
with
189 additions
and
93 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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