diff options
Diffstat (limited to 'src/editfns.c')
| -rw-r--r-- | src/editfns.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/editfns.c b/src/editfns.c index f76beb5e678..4a9e2314a84 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -218,11 +218,13 @@ usage: (char-to-string CHAR) */) | |||
| 218 | } | 218 | } |
| 219 | 219 | ||
| 220 | DEFUN ("byte-to-string", Fbyte_to_string, Sbyte_to_string, 1, 1, 0, | 220 | DEFUN ("byte-to-string", Fbyte_to_string, Sbyte_to_string, 1, 1, 0, |
| 221 | doc: /* Convert arg BYTE to a string containing that byte. */) | 221 | doc: /* Convert arg BYTE to a unibyte string containing that byte. */) |
| 222 | (Lisp_Object byte) | 222 | (Lisp_Object byte) |
| 223 | { | 223 | { |
| 224 | unsigned char b; | 224 | unsigned char b; |
| 225 | CHECK_NUMBER (byte); | 225 | CHECK_NUMBER (byte); |
| 226 | if (XINT (byte) < 0 || XINT (byte) > 255) | ||
| 227 | error ("Invalid byte"); | ||
| 226 | b = XINT (byte); | 228 | b = XINT (byte); |
| 227 | return make_string_from_bytes (&b, 1, 1); | 229 | return make_string_from_bytes (&b, 1, 1); |
| 228 | } | 230 | } |