A few bugfixes.

pull/13171/head
Joshua Haberman 5 years ago
parent ca84145476
commit 1da9cfde77
  1. 7
      upb/reflection.c
  2. 1
      upb/textencode.c

@ -186,6 +186,13 @@ bool upb_msg_next(const upb_msg *msg, const upb_msgdef *m,
}
/* Continue if NULL or 0. */
if (memcmp(&test, &zero, sizeof(test)) == 0) continue;
/* Continue on empty array or map. */
if (upb_fielddef_ismap(f)) {
if (upb_map_size(test.map_val) == 0) continue;
} else if (upb_fielddef_isseq(f)) {
if (upb_array_size(test.array_val) == 0) continue;
}
}
*out_val = val;

@ -113,6 +113,7 @@ static void txtenc_string(txtenc *e, upb_strview str, bool bytes) {
} else {
txtenc_putbytes(e, ptr, 1);
}
break;
}
ptr++;
}

Loading…
Cancel
Save