aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog2
-rw-r--r--src/character.c8
2 files changed, 3 insertions, 7 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 5b41db9831a..46c22caeea9 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -106,7 +106,7 @@
106 (str_as_unibyte, str_to_unibyte, string_count_byte8) 106 (str_as_unibyte, str_to_unibyte, string_count_byte8)
107 (string_escape_byte8, Fget_byte): 107 (string_escape_byte8, Fget_byte):
108 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough. 108 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
109 (Funibyte_string): Use CHECK_CHARACTER, not CHECK_NATNUM, to 109 (Funibyte_string): Use CHECK_RANGED_INTEGER, not CHECK_NATNUM, to
110 avoid mishandling large integers. 110 avoid mishandling large integers.
111 * character.h: Adjust decls to match defn changes elsewhere. 111 * character.h: Adjust decls to match defn changes elsewhere.
112 * charset.c (load_charset_map_from_file, find_charsets_in_text) 112 * charset.c (load_charset_map_from_file, find_charsets_in_text)
diff --git a/src/character.c b/src/character.c
index 1e8c75d2597..3517dbba47d 100644
--- a/src/character.c
+++ b/src/character.c
@@ -924,7 +924,6 @@ usage: (unibyte-string &rest BYTES) */)
924 (ptrdiff_t n, Lisp_Object *args) 924 (ptrdiff_t n, Lisp_Object *args)
925{ 925{
926 ptrdiff_t i; 926 ptrdiff_t i;
927 int c;
928 unsigned char *buf, *p; 927 unsigned char *buf, *p;
929 Lisp_Object str; 928 Lisp_Object str;
930 USE_SAFE_ALLOCA; 929 USE_SAFE_ALLOCA;
@@ -934,11 +933,8 @@ usage: (unibyte-string &rest BYTES) */)
934 933
935 for (i = 0; i < n; i++) 934 for (i = 0; i < n; i++)
936 { 935 {
937 CHECK_CHARACTER (args[i]); 936 CHECK_RANGED_INTEGER (0, args[i], 255);
938 c = XFASTINT (args[i]); 937 *p++ = XINT (args[i]);
939 if (c >= 256)
940 args_out_of_range_3 (args[i], make_number (0), make_number (255));
941 *p++ = c;
942 } 938 }
943 939
944 str = make_string_from_bytes ((char *) buf, n, p - buf); 940 str = make_string_from_bytes ((char *) buf, n, p - buf);