Add PB_LTYPE_UVARINT to fix encoding of negative int32 values.
authorPetteri Aimonen <jpa@git.mail.kapsi.fi>
Sat, 21 Dec 2013 10:16:03 +0000 (12:16 +0200)
committerPetteri Aimonen <jpa@git.mail.kapsi.fi>
Sat, 21 Dec 2013 10:16:03 +0000 (12:16 +0200)
commitee5b12c537115b113ce01708d4a86a4062cdb182
tree53c617ada095685ae321e71fbda1b7d7d35ce2cd
parent9cc19a5e998d93fbe6d7a7c18fba1e37a36076d5
Add PB_LTYPE_UVARINT to fix encoding of negative int32 values.

Apparently int32 values that are negative must be cast into int64 first
before being encoded. Because uint32 still needs to be cast to uint64,
the cases for int32 and uint32 had to be separated.

Update issue 97
Status: FixedInGit
pb.h
pb_decode.c
pb_encode.c