summaryrefslogtreecommitdiffstats
path: root/stream.c
diff options
context:
space:
mode:
Diffstat (limited to 'stream.c')
-rw-r--r--stream.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/stream.c b/stream.c
index 3acf430a..39dbc18e 100644
--- a/stream.c
+++ b/stream.c
@@ -1690,9 +1690,10 @@ val make_string_byte_input_stream(val string)
type_assert (stringp(string), (lit("~a is not a string"), string, nao));
{
+ const wchar_t *wstring = c_str(string);
struct byte_input *bi = coerce(struct byte_input *, chk_malloc(sizeof *bi));
strm_base_init(&bi->a);
- bi->buf = utf8_dup_to_buf(c_str(string), &bi->size, 0);
+ bi->buf = utf8_dup_to_buf(wstring, &bi->size, 0);
bi->index = 0;
return cobj(coerce(mem_t *, bi), stream_s, &byte_in_ops.cobj_ops);
}