aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-11-24 14:17:55 -0500
committerDavid Robillard <d@drobilla.net>2022-11-24 15:13:56 -0500
commit1f2ac0050a87bab21ad2fa8c2e09cd2d2da1eb8b (patch)
treea77c0880aaee37fe9f9817a1e5859927334126f9
parent1c06094202f2254f33ce05bcebf227c95712d7b3 (diff)
downloadserd-1f2ac0050a87bab21ad2fa8c2e09cd2d2da1eb8b.tar.gz
serd-1f2ac0050a87bab21ad2fa8c2e09cd2d2da1eb8b.tar.bz2
serd-1f2ac0050a87bab21ad2fa8c2e09cd2d2da1eb8b.zip
Fix improper use of chunk sink
-rw-r--r--src/node.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/node.c b/src/node.c
index c2396c66..addaa07b 100644
--- a/src/node.c
+++ b/src/node.c
@@ -224,13 +224,13 @@ serd_node_new_file_uri(const uint8_t* const path,
}
}
- serd_chunk_sink_finish(&chunk);
+ const uint8_t* const string = serd_chunk_sink_finish(&chunk);
- if (out) {
- serd_uri_parse(chunk.buf, out);
+ if (string && out) {
+ serd_uri_parse(string, out);
}
- return serd_node_from_substring(SERD_URI, chunk.buf, chunk.len);
+ return serd_node_from_substring(SERD_URI, string, chunk.len);
}
SerdNode