aboutsummaryrefslogtreecommitdiffstats
path: root/src/env.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/env.c')
-rw-r--r--src/env.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/env.c b/src/env.c
index a753c140..92cb4150 100644
--- a/src/env.c
+++ b/src/env.c
@@ -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: {