-
Notifications
You must be signed in to change notification settings - Fork 32
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
Various small fixes #127
Open
laurentg
wants to merge
43
commits into
bliksemlabs:master
Choose a base branch
from
laurentg:laurent-fixes
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Various small fixes #127
Conversation
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
laurentg
commented
Jul 2, 2014
- Correct polyline encoding bug for small negative delta (when float c is negative but rounded binary is 0, ~0 = FFFF...)
- Polyline encoding: use proper rounding for float to binary conversion, this allow polyline tests copied over from the web to pass properly (also correct few previous tests)
- Add distance to walk legs in JSON output, as it seems to be mandatory for existing OTP clients
- Remove duplicated initializations in request buffer, zero out the buffer to zero the padding bytes and to make it safer in case somebody add new fields
- Output NULL instead of "null" string for plan error when no error to make JSON output compatible with OTP
- Replace inexisting (removed?) function in hashgrid unit function.
In qstring.c, the from_hex function was passing a char argument to the isdigit function. However, according to the C standard (draft N1570), "the argument is an int, the value of which shall be representable as an unsigned char or shall equal the value of the macro EOF. If the argument has any other value, the behavior is undefined". Since char can either be signed or unsigned, casting a char to an int could lead to negative values (unequal to EOF) being passed to the isdigit function. This problem was showing up as a cryptic GCC warning about array indexes, but as it turned out, it was actually a signedness issue instead.
When a user specified a search departing after 12:00:03, this would actually be interpreted as 12:00:00. This commit stores information about rounding inside formerly unused padding bytes in the router request.
Using the LL suffix on 1000LL we enforce this. On 64bit the value will by definition be 64bit.
…ain time and at what stop a transfer takes place.
Because I hate the fact that whitespace still occur in the commits.
Remove redundant initializations.
Bug when rounded binary is exactly 0 and c is negative.
This field seems to be mandatory in existing OTP clients.
This align with unit testing results from the web. Add unit-testing for small neg delta.
Sorry, this was a side-effect from a recovery needed after a @skinkie cock-up |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.