+2010-11-21 Chong Yidong <cyd@stupidchicken.com>
+
+ * editfns.c (Fbyte_to_string): Signal an error arg is not a byte.
+
2010-11-20 Jan Djärv <jan.h.d@swipnet.se>
* gtkutil.c (menubar_map_cb): New function (Bug#7425).
}
DEFUN ("byte-to-string", Fbyte_to_string, Sbyte_to_string, 1, 1, 0,
- doc: /* Convert arg BYTE to a string containing that byte. */)
+ doc: /* Convert arg BYTE to a unibyte string containing that byte. */)
(byte)
Lisp_Object byte;
{
unsigned char b;
CHECK_NUMBER (byte);
+ if (XINT (byte) < 0 || XINT (byte) > 255)
+ error ("Invalid byte");
b = XINT (byte);
return make_string_from_bytes (&b, 1, 1);
}