summary refs log tree commit diff
path: root/locale/programs/ld-numeric.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-11-21 06:02:35 +0000
committerUlrich Drepper <drepper@redhat.com>1999-11-21 06:02:35 +0000
commit1ceb8afe3d8c3c9b1ca7a6f0d13ee762667f397d (patch)
tree6ad5ea55d2cd40cd1235d681331ba0bb201ebbaf /locale/programs/ld-numeric.c
parentbece1bc4ec83cde611243c891d3a93b5e9bbcedd (diff)
downloadglibc-1ceb8afe3d8c3c9b1ca7a6f0d13ee762667f397d.tar.gz
glibc-1ceb8afe3d8c3c9b1ca7a6f0d13ee762667f397d.tar.xz
glibc-1ceb8afe3d8c3c9b1ca7a6f0d13ee762667f397d.zip
Update.
	* locale/programs/ld-time.c (time_startup): Test for lr being
	nonzero, not time.

	* locale/programs/ld-numeric.c (numeric_finish): Don't crash if
	decimal_point is not defined.
Diffstat (limited to 'locale/programs/ld-numeric.c')
-rw-r--r--locale/programs/ld-numeric.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/locale/programs/ld-numeric.c b/locale/programs/ld-numeric.c
index 697ad35bb9..3bf198aba5 100644
--- a/locale/programs/ld-numeric.c
+++ b/locale/programs/ld-numeric.c
@@ -114,7 +114,13 @@ numeric_finish (struct localedef_t *locale, struct charmap_t *charmap)
   /* The decimal point must not be empty.  This is not said explicitly
      in POSIX but ANSI C (ISO/IEC 9899) says in 4.4.2.1 it has to be
      != "".  */
-  if (numeric->decimal_point[0] == '\0' && ! be_quiet && ! nothing)
+  if (numeric->decimal_point == NULL)
+    {
+      error (0, 0, _("%s: field `%s' not defined"),
+	     "LC_NUMERIC", "decimal_point");
+      numeric->decimal_point = ".";
+    }
+  else if (numeric->decimal_point[0] == '\0' && ! be_quiet && ! nothing)
     {
       error (0, 0, _("\
 %s: value for field `%s' must not be the empty string"),