aboutsummaryrefslogtreecommitdiffstats
path: root/mpi/mpicoder.c
diff options
context:
space:
mode:
Diffstat (limited to 'mpi/mpicoder.c')
-rw-r--r--mpi/mpicoder.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mpi/mpicoder.c b/mpi/mpicoder.c
index 4aaf2c017..0005f21a8 100644
--- a/mpi/mpicoder.c
+++ b/mpi/mpicoder.c
@@ -80,15 +80,16 @@ mpi_read(IOBUF inp, unsigned *ret_nread, int secure)
if( (c = iobuf_get(inp)) == -1 )
goto leave;
+ nread++;
nbits = c << 8;
if( (c = iobuf_get(inp)) == -1 )
goto leave;
+ nread++;
nbits |= c;
if( nbits > MAX_EXTERN_MPI_BITS ) {
log_error("mpi too large (%u bits)\n", nbits);
goto leave;
}
- nread = 2;
nbytes = (nbits+7) / 8;
nlimbs = (nbytes+BYTES_PER_MPI_LIMB-1) / BYTES_PER_MPI_LIMB;