index 126cb0751b316490724dae1231c719ba044f4cdc..e765cea5aaa4e090d37b47b71a1df59c98cc979b 100644 (file)
@@ -584,7 +584,7 @@ shm_mq_receive(shm_mq_handle *mqh, Size *nbytesp, void **datap, bool nowait)
if (mqh->mqh_partial_bytes + rb > sizeof(Size))
lengthbytes = sizeof(Size) - mqh->mqh_partial_bytes;
else
- lengthbytes = rb - mqh->mqh_partial_bytes;
+ lengthbytes = rb;
memcpy(&mqh->mqh_buffer[mqh->mqh_partial_bytes], rawdata,
lengthbytes);
mqh->mqh_partial_bytes += lengthbytes;