mpi: Make gcry_mpi_print work with negative zeroes.
authorWerner Koch <wk@gnupg.org>
Fri, 30 Aug 2013 15:04:21 +0000 (17:04 +0200)
committerWerner Koch <wk@gnupg.org>
Fri, 30 Aug 2013 15:04:21 +0000 (17:04 +0200)
commite9b711e6ddb480a71d2996465074e436c752c005
treea840700ffbf21ab8b1a26c2ee60494ac6266097b
parent800d4e01376d52a94a157b53978c7c3f957fc476
mpi: Make gcry_mpi_print work with negative zeroes.

* mpi/mpicoder.c (gcry_mpi_print): Take care of negative zero.
(gcry_mpi_aprint): Allocate at least 1 byte.
* tests/t-convert.c: New.
* tests/Makefile.am (TESTS): Add t-convert.
--

Reported-by: Christian Fuchs
Signed-off-by: Werner Koch <wk@gnupg.org>
mpi/mpicoder.c
tests/Makefile.am
tests/t-convert.c [new file with mode: 0644]