changeset 24511:6dbea1df5686

(decode_mode_spec_coding): Handle integer value in eoltype correctly for backward compatibility.
author Kenichi Handa <handa@m17n.org>
date Tue, 23 Mar 1999 12:29:30 +0000
parents 3aeaac397061
children ca92d7df3b48
files src/xdisp.c
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/xdisp.c	Tue Mar 23 12:28:55 1999 +0000
+++ b/src/xdisp.c	Tue Mar 23 12:29:30 1999 +0000
@@ -4622,12 +4622,20 @@
 	  eol_str = XSTRING (eoltype)->data;
 	  eol_str_len = XSTRING (eoltype)->size;
 	}
+      else if (INTEGERP (eoltype)
+	       && CHAR_VALID_P (XINT (eoltype), 0))
+	{
+	  int c = XINT (eoltype);
+	  unsigned char work[4];
+
+	  eol_str_len = CHAR_STRING (XINT (eoltype), work, eol_str);
+	}
       else
 	{
 	  eol_str = invalid_eol_type;
 	  eol_str_len = sizeof (invalid_eol_type) - 1;
 	}
-      strcpy (buf, eol_str);
+      bcopy (eol_str, buf, eol_str_len);
       buf += eol_str_len;
     }