]> git.eshelyaron.com Git - emacs.git/commitdiff
(skip_chars): Check type of `string' before using it.
authorKarl Heuer <kwzh@gnu.org>
Thu, 20 Nov 1997 22:03:42 +0000 (22:03 +0000)
committerKarl Heuer <kwzh@gnu.org>
Thu, 20 Nov 1997 22:03:42 +0000 (22:03 +0000)
src/syntax.c

index 371ddedbd74b3b279f2ef8489df37ec7879f7999..3c480b41b0d0ea74028fbce1678b9a68cd734a7d 100644 (file)
@@ -1149,14 +1149,14 @@ skip_chars (forwardp, syntaxp, string, lim)
      form "X-Y" of STRING, both X and Y must belong to the same
      character set because a range striding across character sets is
      meaningless.  */
-  int *char_ranges
-    = (int *) alloca (XSTRING (string)->size * (sizeof (int)) * 2);
+  int *char_ranges;
   int n_char_ranges = 0;
   int negate = 0;
   register int i;
   int multibyte = !NILP (current_buffer->enable_multibyte_characters);
 
   CHECK_STRING (string, 0);
+  char_ranges = (int *) alloca (XSTRING (string)->size * (sizeof (int)) * 2);
 
   if (NILP (lim))
     XSETINT (lim, forwardp ? ZV : BEGV);