diff options
Diffstat (limited to 'rpc_client_serial.c')
-rw-r--r-- | rpc_client_serial.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/rpc_client_serial.c b/rpc_client_serial.c index 5eed2dd..149998e 100644 --- a/rpc_client_serial.c +++ b/rpc_client_serial.c @@ -62,5 +62,8 @@ hal_error_t hal_rpc_send(const uint8_t * const buf, const size_t len) hal_error_t hal_rpc_recv(uint8_t * const buf, size_t * const len) { - return hal_slip_recv(buf, len, *len); + size_t maxlen = *len; + *len = 0; + hal_error_t err = hal_slip_recv(buf, len, maxlen); + return err; } |