Commit 0cedd530 authored by Stefan Monnier's avatar Stefan Monnier

(make_temp_name): Handle multibyte prefixes.

parent abaf2e77
2004-08-07 Stefan Monnier <monnier@iro.umontreal.ca>
* fileio.c (make_temp_name): Handle multibyte prefixes.
2004-08-06 Luc Teirlinck <teirllm@auburn.edu>
* keyboard.c (syms_of_keyboard) <overriding-terminal-local-map>:
......
......@@ -886,7 +886,7 @@ make_temp_name (prefix, base64_p)
int base64_p;
{
Lisp_Object val;
int len;
int len, clen;
int pid;
unsigned char *p, *data;
char pidbuf[20];
......@@ -921,8 +921,10 @@ make_temp_name (prefix, base64_p)
#endif
}
len = SCHARS (prefix);
val = make_uninit_string (len + 3 + pidlen);
len = SBYTES (prefix); clen = SCHARS (prefix);
val = make_uninit_multibyte_string (clen + 3 + pidlen, len + 3 + pidlen);
if (!STRING_MULTIBYTE (prefix))
STRING_SET_UNIBYTE (val);
data = SDATA (val);
bcopy(SDATA (prefix), data, len);
p = data + len;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment