From 60573a904900a07b417eadbb61383568dc4354c2 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 1 Jul 1995 22:29:51 +0000 Subject: [PATCH] (compute_char_face): Use Fsafe_length. --- src/xfaces.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/xfaces.c b/src/xfaces.c index efacf370c27..8872b724810 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -895,10 +895,13 @@ compute_char_face (f, w, pos, region_beg, region_end, endptr, limit, mouse) if (CONSP (prop)) { /* We have a list of faces, merge them in reverse order */ - Lisp_Object length = Flength (prop); - int len = XINT (length); + Lisp_Object length; + int len; Lisp_Object *faces; + length = Fsafe_length (prop); + len = XFASTINT (length); + /* Put them into an array */ faces = (Lisp_Object *) alloca (len * sizeof (Lisp_Object)); for (j = 0; j < len; j++) @@ -932,10 +935,12 @@ compute_char_face (f, w, pos, region_beg, region_end, endptr, limit, mouse) if (CONSP (prop)) { /* We have a list of faces, merge them in reverse order */ - Lisp_Object length = Flength (prop); - int len = XINT (length); + Lisp_Object length; + int len; Lisp_Object *faces; - int i; + + length = Fsafe_length (prop); + len = XFASTINT (length); /* Put them into an array */ faces = (Lisp_Object *) alloca (len * sizeof (Lisp_Object)); -- 2.39.2