diff options
Diffstat (limited to 'src/node.c')
-rw-r--r-- | src/node.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -359,7 +359,7 @@ encode_chunk(uint8_t out[4], const uint8_t in[3], size_t n_in) SerdNode serd_node_new_blob(const void* buf, size_t size, bool wrap_lines) { - const size_t len = ((size + 2) / 3) * 4 + (wrap_lines ? (size / 57) : 0); + const size_t len = (size + 2) / 3 * 4 + (wrap_lines * ((size - 1) / 57)); uint8_t* str = (uint8_t*)calloc(1, len + 2); SerdNode node = { str, len, len, 0, SERD_LITERAL }; for (size_t i = 0, j = 0; i < size; i += 3, j += 4) { |