]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(write_locales): Fix handling of whitespace lines.
authorUlrich Drepper <drepper@redhat.com>
Fri, 11 Feb 2000 20:49:36 +0000 (20:49 +0000)
committerUlrich Drepper <drepper@redhat.com>
Fri, 11 Feb 2000 20:49:36 +0000 (20:49 +0000)
locale/programs/locale.c

index 9d6a9311238e77781a70096ee91ef60e808ac97e..53bb6f8680c47c5f15784a13c528d7c2c5a14575 100644 (file)
@@ -1,5 +1,5 @@
 /* Implementation of the locale program according to POSIX 9945-2.
-   Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+   Copyright (C) 1995-1999, 2000 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
 
@@ -376,11 +376,11 @@ write_locales (void)
 
          cp = buf;
          /* Ignore leading white space.  */
-         while (isspace (cp[0]))
+         while (isspace (cp[0]) && cp[0] != '\n')
            ++cp;
 
          /* A leading '#' signals a comment line.  */
-         if (cp[0] != '\0' && cp[0] != '#')
+         if (cp[0] != '\0' && cp[0] != '#' && cp[0] != '\n')
            {
              alias = cp++;
              while (cp[0] != '\0' && !isspace (cp[0]))