diff options
Diffstat (limited to 'src/env.c')
-rw-r--r-- | src/env.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -245,8 +245,9 @@ serd_env_expand_node(const SerdEnv* env, } const size_t len = prefix.len + suffix.len; uint8_t* buf = (uint8_t*)malloc(len + 1); - SerdNode ret = { buf, len, serd_strlen(buf, NULL, NULL), 0, SERD_URI }; - snprintf((char*)buf, ret.n_bytes + 1, "%s%s", prefix.buf, suffix.buf); + SerdNode ret = { buf, len, 0, 0, SERD_URI }; + snprintf((char*)buf, len + 1, "%s%s", prefix.buf, suffix.buf); + ret.n_chars = serd_strlen(buf, NULL, NULL); return ret; } case SERD_URI: { |