From b99eae6b3f4dd5edd2d5419f4dc0534e32aaa0e2 Mon Sep 17 00:00:00 2001 From: whitequark Date: Sun, 9 Aug 2015 20:36:14 +0300 Subject: [PATCH] session.c: send_rpc_value: fix list serialization. --- soc/runtime/session.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/soc/runtime/session.c b/soc/runtime/session.c index 88bcfaefa..2ea0c0e8e 100644 --- a/soc/runtime/session.c +++ b/soc/runtime/session.c @@ -771,13 +771,12 @@ static int send_rpc_value(const char **tag, void **value) if(!out_packet_int32(list->length)) return 0; - const char *tag_copy = *tag; for(int i = 0; i < list->length; i++) { + const char *tag_copy = *tag; if(!send_rpc_value(&tag_copy, &element)) return 0; - tag_copy = *tag; } - *tag = tag_copy; + skip_rpc_value(tag); *value = (void*)((intptr_t)(*value) + sizeof(*list)); break;