Skip to content

Fix wrong integer en- and decoding in protobuf-c-text library.#5

Open
bwegge wants to merge 2 commits into
protobuf-c:masterfrom
bwegge:master
Open

Fix wrong integer en- and decoding in protobuf-c-text library.#5
bwegge wants to merge 2 commits into
protobuf-c:masterfrom
bwegge:master

Conversation

@bwegge

@bwegge bwegge commented Nov 18, 2014

Copy link
Copy Markdown
  1. int{32,64} should be treated as signed integers (see https://developers.google.com/protocol-buffers/docs/proto#scalar)
  2. [u]int64 are [unsigned] long long integers on 32 bit platforms. The second patch uses inttypes.h macros for a compatible way to printf these integers, but this probably needs C99 where inttypes.h was officially introduced.

Benjamin Weggenmann added 2 commits November 19, 2014 12:00
[u]int64 is [unsigned] long *or* long long depending on the word size.
Use inttypes.h macros (C99) to use correct encoding on all architectures.
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.

1 participant