comparison src/w32select.c @ 53798:ad0a7541533d

* w32select.c (Fw32_set_clipboard_data): Make coding iso2022 safe. * w32fns.c (x_to_w32_font): Likewise.
author Jason Rumney <jasonr@gnu.org>
date Tue, 03 Feb 2004 23:44:47 +0000
parents 695cf19ef79e
children 64d01f3f16e5
comparison
equal deleted inserted replaced
53797:1f2fa74fb0aa 53798:ad0a7541533d
210 src = SDATA (string); 210 src = SDATA (string);
211 nbytes = SBYTES (string); 211 nbytes = SBYTES (string);
212 } 212 }
213 coding.src_multibyte = 1; 213 coding.src_multibyte = 1;
214 coding.dst_multibyte = 0; 214 coding.dst_multibyte = 0;
215 /* Need to set COMPOSITION_DISABLED, otherwise Emacs crashes in
216 encode_coding_iso2022 trying to dereference a null pointer. */
217 coding.composing = COMPOSITION_DISABLED;
218 if (coding.type == coding_type_iso2022)
219 coding.flags |= CODING_FLAG_ISO_SAFE;
215 Vnext_selection_coding_system = Qnil; 220 Vnext_selection_coding_system = Qnil;
216 coding.mode |= CODING_MODE_LAST_BLOCK; 221 coding.mode |= CODING_MODE_LAST_BLOCK;
217 bufsize = encoding_buffer_size (&coding, nbytes); 222 bufsize = encoding_buffer_size (&coding, nbytes);
218 if ((htext = GlobalAlloc (GMEM_MOVEABLE | GMEM_DDESHARE, bufsize)) == NULL) 223 if ((htext = GlobalAlloc (GMEM_MOVEABLE | GMEM_DDESHARE, bufsize)) == NULL)
219 goto error; 224 goto error;