changeset 3790:9009dff1b90b

(GET_UNSIGNED_NUMBER): Give proper error for spaces.
author Richard Stallman <rms@gnu.org>
date Mon, 25 Mar 2002 00:45:48 +0000
parents 06f52f435b13
children 1b04a49457b1
files regex.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/regex.c
+++ b/regex.c
@@ -1944,7 +1944,8 @@
  do { if (p != pend)							\
      {									\
        PATFETCH (c);							\
-       while (c == ' ') PATFETCH (c);					\
+       if (c == ' ')							\
+	 FREE_STACK_RETURN (REG_BADBR);					\
        while ('0' <= c && c <= '9')					\
 	 {								\
            int prev;							\
@@ -1958,7 +1959,8 @@
 	     break;							\
 	   PATFETCH (c);						\
 	 }								\
-       while (c == ' ') PATFETCH (c);					\
+       if (c == ' ')							\
+	 FREE_STACK_RETURN (REG_BADBR);					\
        }								\
     } while (0)