Skip to content

Commit

Permalink
Worked around segfault on Ubuntu 14.04
Browse files Browse the repository at this point in the history
  • Loading branch information
Bill Monkman authored and claude-vessaz-hs committed Dec 17, 2019
1 parent 1845346 commit 7d6e225
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions writer.c
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,9 @@ static inline void writer_write_varint(writer_t *writer, int64_t value)
int i;
uint8_t byte;

if (writer_ensure_space(writer, WRITER_VARINT_SPACE) != 0)
return;

if (value == 0) {
writer->data[writer->pos++] = 0;
} else if (value < 0) {
Expand Down

0 comments on commit 7d6e225

Please sign in to comment.