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

Various small fixes #127

Open
wants to merge 43 commits into
base: master
Choose a base branch
from
Open

Conversation

laurentg
Copy link

@laurentg 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.

abyrd and others added 30 commits November 16, 2013 13:39
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.
@koch-t
Copy link
Contributor

koch-t commented Dec 9, 2014

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants