diff options
author | David Robillard <d@drobilla.net> | 2018-05-13 00:34:55 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2018-05-27 21:10:21 +0200 |
commit | 655e6429d10091da033973027b4a1c5393e53a1c (patch) | |
tree | 157fceeef962f20ce87150a4bafb70695a7cab9c /src/byte_source.c | |
parent | b260af75f48f3824d6fbcb634ddc285f2be4665e (diff) | |
download | serd-655e6429d10091da033973027b4a1c5393e53a1c.tar.gz serd-655e6429d10091da033973027b4a1c5393e53a1c.tar.bz2 serd-655e6429d10091da033973027b4a1c5393e53a1c.zip |
Fix UTF-8 round tripping
Diffstat (limited to 'src/byte_source.c')
-rw-r--r-- | src/byte_source.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/byte_source.c b/src/byte_source.c index 42f7e557..309a0ca6 100644 --- a/src/byte_source.c +++ b/src/byte_source.c @@ -63,7 +63,7 @@ serd_byte_source_open_source(SerdByteSource* source, source->from_stream = true; if (page_size > 1) { - source->file_buf = (char*)serd_allocate_buffer(page_size); + source->file_buf = (uint8_t*)serd_allocate_buffer(page_size); source->read_buf = source->file_buf; memset(source->file_buf, '\0', page_size); } else { @@ -94,7 +94,7 @@ serd_byte_source_open_string(SerdByteSource* source, const char* utf8) memset(source, '\0', sizeof(*source)); source->cur = cur; - source->read_buf = utf8; + source->read_buf = (const uint8_t*)utf8; return SERD_SUCCESS; } |