about summary refs log tree commit diff
path: root/locale/programs
diff options
context:
space:
mode:
Diffstat (limited to 'locale/programs')
-rw-r--r--locale/programs/ld-monetary.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/locale/programs/ld-monetary.c b/locale/programs/ld-monetary.c
index e2634bc2c9..b8d291e7fc 100644
--- a/locale/programs/ld-monetary.c
+++ b/locale/programs/ld-monetary.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1995-1999,2000,2001,2002,2005 Free Software Foundation, Inc.
+/* Copyright (C) 1995-1999,2000,2001,2002,2005,2007
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@gnu.org>, 1995.
 
@@ -279,13 +280,14 @@ not correspond to a valid name in ISO 4217"),
        monetary->cat = initval;						      \
     }									      \
   else if ((monetary->cat < min || monetary->cat > max)			      \
+	   && min < max							      \
 	   && !be_quiet && !nothing)					      \
     WITH_CUR_LOCALE (error (0, 0, _("\
 %s: value for field `%s' must be in range %d...%d"),			      \
 			    "LC_MONETARY", #cat, min, max))
 
-  TEST_ELEM (int_frac_digits, -128, 127, -1);
-  TEST_ELEM (frac_digits, -128, 127, -1);
+  TEST_ELEM (int_frac_digits, 1, 0, -1);
+  TEST_ELEM (frac_digits, 1, 0, -1);
   TEST_ELEM (p_cs_precedes, -1, 1, -1);
   TEST_ELEM (p_sep_by_space, -1, 2, -1);
   TEST_ELEM (n_cs_precedes, -1, 1, -1);