aboutsummaryrefslogtreecommitdiffstats
path: root/src/fns.c
diff options
context:
space:
mode:
authorPaul Eggert2011-06-18 09:04:07 -0700
committerPaul Eggert2011-06-18 09:04:07 -0700
commita4cf38e4bad869b1dc6af9c0b61b3e06da157dd3 (patch)
treeb5071585a690079f22c2e289628a98f30ea1296a /src/fns.c
parent311d5d7cc63a9f2d4823066f82faeb4fb6203710 (diff)
downloademacs-a4cf38e4bad869b1dc6af9c0b61b3e06da157dd3.tar.gz
emacs-a4cf38e4bad869b1dc6af9c0b61b3e06da157dd3.zip
* fns.c: Check that character arg fits in 'int'.
Diffstat (limited to 'src/fns.c')
-rw-r--r--src/fns.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fns.c b/src/fns.c
index 51b753b3134..702ecbd7c63 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -2141,7 +2141,6 @@ ARRAY is a vector, string, char-table, or bool-vector. */)
2141 (Lisp_Object array, Lisp_Object item) 2141 (Lisp_Object array, Lisp_Object item)
2142{ 2142{
2143 register EMACS_INT size, idx; 2143 register EMACS_INT size, idx;
2144 int charval;
2145 2144
2146 if (VECTORP (array)) 2145 if (VECTORP (array))
2147 { 2146 {
@@ -2161,8 +2160,9 @@ ARRAY is a vector, string, char-table, or bool-vector. */)
2161 else if (STRINGP (array)) 2160 else if (STRINGP (array))
2162 { 2161 {
2163 register unsigned char *p = SDATA (array); 2162 register unsigned char *p = SDATA (array);
2164 CHECK_NUMBER (item); 2163 int charval;
2165 charval = XINT (item); 2164 CHECK_CHARACTER (item);
2165 charval = XFASTINT (item);
2166 size = SCHARS (array); 2166 size = SCHARS (array);
2167 if (STRING_MULTIBYTE (array)) 2167 if (STRING_MULTIBYTE (array))
2168 { 2168 {