diff options
author | Andy Wingo <wingo@pobox.com> | 2019-08-02 15:02:49 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2019-08-02 15:02:49 +0200 |
commit | 94b20b79ec5c0001592a8bff21cf3fcf24f09f4d (patch) | |
tree | 50b2a95dea0f3ca70831ccca7ca267a56286bebc /libguile/strports.c | |
parent | 11475e0f84b24cc66b2e3fc5bbf002c3900ff295 (diff) | |
parent | 9f7a824206702350427aa59382082d1019c3011d (diff) | |
download | guile-94b20b79ec5c0001592a8bff21cf3fcf24f09f4d.tar.gz |
Merge from stable-2.2
Diffstat (limited to 'libguile/strports.c')
-rw-r--r-- | libguile/strports.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libguile/strports.c b/libguile/strports.c index 821a04c4b..4cb2b9119 100644 --- a/libguile/strports.c +++ b/libguile/strports.c @@ -199,8 +199,8 @@ scm_mkstrport (SCM pos, SCM str, long modes, const char *caller) else /* Inefficient but simple way to convert the character position POS into a byte position BYTE_POS. */ - free (scm_to_utf8_stringn (scm_substring (str, SCM_INUM0, pos), - &byte_pos)); + byte_pos = scm_c_string_utf8_length + (scm_substring (str, SCM_INUM0, pos)); } stream = scm_gc_typed_calloc (struct string_port); |