Fix varint-skipping (oops).

pull/13171/head
Joshua Haberman 16 years ago
parent 324d5cce9b
commit 0f26f51486
  1. 9
      upb_parse.c

@ -55,9 +55,12 @@ done:
static upb_status_t skip_v_uint64_t(void **buf) static upb_status_t skip_v_uint64_t(void **buf)
{ {
for(int i = 0; i < 10; i++, *buf++) { uint8_t *b = *buf;
uint8_t *b = *buf; for(int i = 0; i < 10; i++, b++) {
if(!(*b & 0x80)) return UPB_STATUS_OK; if(!(*b & 0x80)) {
*buf = b;
return UPB_STATUS_OK;
}
} }
return UPB_ERROR_UNTERMINATED_VARINT; return UPB_ERROR_UNTERMINATED_VARINT;
} }

Loading…
Cancel
Save