mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-06 11:50:51 -08:00
(send_process): Properly relocate pointer into data
when using encoded data.
This commit is contained in:
parent
6dc43c2e2d
commit
b5bfebec13
2 changed files with 11 additions and 2 deletions
|
|
@ -1,3 +1,8 @@
|
|||
2009-02-10 Andreas Schwab <schwab@suse.de>
|
||||
|
||||
* process.c (send_process): Properly relocate pointer into data
|
||||
when using encoded data.
|
||||
|
||||
2009-02-08 ARISAWA Akihiro <ari@mbf.sphere.ne.jp>
|
||||
|
||||
* coding.c (detect_coding_charset): Fix previous change.
|
||||
|
|
|
|||
|
|
@ -5745,7 +5745,9 @@ send_process (proc, buf, len, object)
|
|||
|
||||
/* Running filters might relocate buffers or strings.
|
||||
Arrange to relocate BUF. */
|
||||
if (BUFFERP (object))
|
||||
if (CODING_REQUIRE_ENCODING (coding))
|
||||
offset = buf - SDATA (coding->dst_object);
|
||||
else if (BUFFERP (object))
|
||||
offset = BUF_PTR_BYTE_POS (XBUFFER (object), buf);
|
||||
else if (STRINGP (object))
|
||||
offset = buf - SDATA (object);
|
||||
|
|
@ -5756,7 +5758,9 @@ send_process (proc, buf, len, object)
|
|||
wait_reading_process_output (1, 0, 0, 0, Qnil, NULL, 0);
|
||||
#endif
|
||||
|
||||
if (BUFFERP (object))
|
||||
if (CODING_REQUIRE_ENCODING (coding))
|
||||
buf = offset + SDATA (coding->dst_object);
|
||||
else if (BUFFERP (object))
|
||||
buf = BUF_BYTE_ADDRESS (XBUFFER (object), offset);
|
||||
else if (STRINGP (object))
|
||||
buf = offset + SDATA (object);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue