# HG changeset patch # User Kenichi Handa # Date 1096346246 0 # Node ID d7211599ad16dea1ec1a922d60685f9166fa5d5a # Parent eebcd044d7bc75ee0a19602650ed0899e00750be (report_file_error): Make a unibyte string from strerror (errorno). (Fsubstitute_in_file_name): Fix the arg to unibyte_char_to_multibyte. It is evaluated twice. diff -r eebcd044d7bc -r d7211599ad16 src/fileio.c --- a/src/fileio.c Mon Sep 27 11:02:42 2004 +0000 +++ b/src/fileio.c Tue Sep 28 04:37:26 2004 +0000 @@ -256,9 +256,12 @@ { Lisp_Object errstring; int errorno = errno; + char *str; synchronize_system_messages_locale (); - errstring = code_convert_string_norecord (build_string (strerror (errorno)), + str = strerror (errorno); + errstring = code_convert_string_norecord (make_unibyte_string (str, + strlen (str)), Vlocale_coding_system, 0); while (1) @@ -2251,7 +2254,8 @@ convert what we substitute into multibyte. */ while (*o) { - int c = unibyte_char_to_multibyte (*o++); + int c = unibyte_char_to_multibyte (*o); + o++; x += CHAR_STRING (c, x); } }