1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-29 19:30:36 +02:00

Merge from stable-2.2

This commit is contained in:
Andy Wingo 2019-08-02 15:02:49 +02:00
commit 94b20b79ec

View file

@ -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);