diff src/fileio.c @ 97747:0d66ae50dc4e

(report_file_error): Fix handling of multibyte error string.
author Kenichi Handa <handa@m17n.org>
date Wed, 27 Aug 2008 01:11:26 +0000
parents 4667576df3e5
children 6a486cee0621
line wrap: on
line diff
--- a/src/fileio.c	Wed Aug 27 00:08:06 2008 +0000
+++ b/src/fileio.c	Wed Aug 27 01:11:26 2008 +0000
@@ -261,8 +261,14 @@
       default:
 	/* System error messages are capitalized.  Downcase the initial
 	   unless it is followed by a slash.  */
-	if (SREF (errstring, 1) != '/')
-	  SSET (errstring, 0, DOWNCASE (SREF (errstring, 0)));
+	if (! EQ (Faref (errstring, make_number (1)), make_number ('/')))
+	  {
+	    int c;
+
+	    str = (char *) SDATA (errstring);
+	    c = STRING_CHAR (str, 0);
+	    Faset (errstring, 0, make_number (DOWNCASE (c)));
+	  }
 
 	xsignal (Qfile_error,
 		 Fcons (build_string (string), Fcons (errstring, data)));