summary refs log tree commit diff
path: root/locale/programs/ld-numeric.c
diff options
context:
space:
mode:
Diffstat (limited to 'locale/programs/ld-numeric.c')
-rw-r--r--locale/programs/ld-numeric.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/locale/programs/ld-numeric.c b/locale/programs/ld-numeric.c
index 375635aafc..2454281a4d 100644
--- a/locale/programs/ld-numeric.c
+++ b/locale/programs/ld-numeric.c
@@ -195,6 +195,11 @@ field `%s' in category `%s' declared more than once"),			      \
 
       if (code->tok == tok_minus1)
 	numeric->grouping[numeric->grouping_act++] = '\177';
+      else if (code->val.num == 0)
+	/* A value of 0 disables grouping from here on but we must
+	   not store a NUL character since this terminates the string.
+	   Use something different which must not be used otherwise.  */
+	numeric->grouping[numeric->grouping_act++] = '\377';
       else if (code->val.num > 126)
 	lr_error (lr, _("\
 values for field `%s' in category `%s' must be smaller than 127"),