summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--upb_parse.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/upb_parse.c b/upb_parse.c
index d9e9485..f000501 100644
--- a/upb_parse.c
+++ b/upb_parse.c
@@ -55,9 +55,12 @@ done:
static upb_status_t skip_v_uint64_t(void **buf)
{
- for(int i = 0; i < 10; i++, *buf++) {
- uint8_t *b = *buf;
- if(!(*b & 0x80)) return UPB_STATUS_OK;
+ uint8_t *b = *buf;
+ for(int i = 0; i < 10; i++, b++) {
+ if(!(*b & 0x80)) {
+ *buf = b;
+ return UPB_STATUS_OK;
+ }
}
return UPB_ERROR_UNTERMINATED_VARINT;
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback