1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-06 12:10:28 +02:00

[libguile] Fix bug: Don't expect ‘send’ string to be writable

Expecting writable strings fails if the string is the result
of ‘symbol->string’, for example.

* libguile/socket.c (scm_send): Use ‘scm_i_string_chars’.
This commit is contained in:
Thien-Thi Nguyen 2017-03-03 06:44:58 +01:00
parent 181e92ba73
commit 3ca22333b7

View file

@ -1482,7 +1482,7 @@ SCM_DEFINE (scm_send, "send", 2, 1, 0,
fd = SCM_FPORT_FDES (sock);
len = scm_i_string_length (message);
src = scm_i_string_writable_chars (message);
src = scm_i_string_chars (message);
SCM_SYSCALL (rv = send (fd, src, len, flg));
scm_i_string_stop_writing ();