diff options
Diffstat (limited to 'src/json')
-rw-r--r-- | src/json/json_pack.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/json/json_pack.c b/src/json/json_pack.c index 296f56104..cc1ca3e97 100644 --- a/src/json/json_pack.c +++ b/src/json/json_pack.c | |||
@@ -31,6 +31,12 @@ GNUNET_JSON_pack_ (struct GNUNET_JSON_PackSpec spec[]) | |||
31 | { | 31 | { |
32 | json_t *ret; | 32 | json_t *ret; |
33 | 33 | ||
34 | if (NULL == spec[0].field_name) | ||
35 | { | ||
36 | ret = spec[0].object; | ||
37 | spec[0].object = NULL; | ||
38 | return ret; | ||
39 | } | ||
34 | ret = json_object (); | 40 | ret = json_object (); |
35 | GNUNET_assert (NULL != ret); | 41 | GNUNET_assert (NULL != ret); |
36 | for (unsigned int i = 0; | 42 | for (unsigned int i = 0; |