Permalink
Browse files

Merge pull request #92 from adamsutton/master

Minor fixes to htsmsg handling
  • Loading branch information...
andoma committed Jun 15, 2012
2 parents bccec43 + 11944f0 commit dd1800c76c60e75cdff18d9bd3e21e1b0dece251
Showing with 6 additions and 1 deletion.
  1. +2 −0 src/htsmsg.c
  2. +4 −1 src/htsmsg_json.c
View
@@ -258,6 +258,7 @@ htsmsg_add_msg(htsmsg_t *msg, const char *name, htsmsg_t *sub)
assert(sub->hm_data == NULL);
TAILQ_MOVE(&f->hmf_msg.hm_fields, &sub->hm_fields, hmf_link);
+ f->hmf_msg.hm_islist = sub->hm_islist;
free(sub);
}
@@ -275,6 +276,7 @@ htsmsg_add_msg_extname(htsmsg_t *msg, const char *name, htsmsg_t *sub)
assert(sub->hm_data == NULL);
TAILQ_MOVE(&f->hmf_msg.hm_fields, &sub->hm_fields, hmf_link);
+ f->hmf_msg.hm_islist = sub->hm_islist;
free(sub);
}
View
@@ -233,7 +233,10 @@ htsmsg_json_parse_object(const char *s, const char **endp)
r = htsmsg_create_map();
- while(1) {
+ while(*s > 0 && *s < 33)
+ s++;
+
+ if(*s != '}') while(1) {
if((name = htsmsg_json_parse_string(s, &s2)) == NULL) {
htsmsg_destroy(r);

0 comments on commit dd1800c

Please sign in to comment.