diff options
| author | Paul Eggert | 2011-10-24 16:16:02 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-10-24 16:16:02 -0700 |
| commit | a14e15687ce2e0a02e27bf85f70b3d9c7dfdf850 (patch) | |
| tree | 06ca6d740c2230fde0f2cee7bed8b50b29729b14 /src/character.c | |
| parent | 0fd11aa5e26da5ee2b36996f1a2376fb2d7ec6cc (diff) | |
| download | emacs-a14e15687ce2e0a02e27bf85f70b3d9c7dfdf850.tar.gz emacs-a14e15687ce2e0a02e27bf85f70b3d9c7dfdf850.zip | |
* character.c (Funibyte_string): Use CHECK_RANGED_INTEGER instead.
Diffstat (limited to 'src/character.c')
| -rw-r--r-- | src/character.c | 8 |
1 files changed, 2 insertions, 6 deletions
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); |