* alloc.c (Fmake_string): Check for out-of-range init.
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 7 Jun 2011 05:32:27 +0000 (22:32 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 7 Jun 2011 05:32:27 +0000 (22:32 -0700)
src/ChangeLog
src/alloc.c

index 87259a0..6d163f5 100644 (file)
@@ -1,3 +1,7 @@
+2011-06-07  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * alloc.c (Fmake_string): Check for out-of-range init.
+
 2011-06-07  Daniel Colascione  <dan.colascione@gmail.com>
 
        * fns.c (Fputhash): Document return value.
index cfbb79b..db1744b 100644 (file)
@@ -2186,9 +2186,9 @@ INIT must be an integer that represents a character.  */)
   EMACS_INT nbytes;
 
   CHECK_NATNUM (length);
-  CHECK_NUMBER (init);
+  CHECK_CHARACTER (init);
 
-  c = XINT (init);
+  c = XFASTINT (init);
   if (ASCII_CHAR_P (c))
     {
       nbytes = XINT (length);