]> git.ipfire.org Git - thirdparty/xz.git/commitdiff
Set LC_NUMERIC=C when --robot is used.
authorLasse Collin <lasse.collin@tukaani.org>
Sun, 24 Jan 2010 20:45:14 +0000 (22:45 +0200)
committerLasse Collin <lasse.collin@tukaani.org>
Sun, 24 Jan 2010 20:45:14 +0000 (22:45 +0200)
It is to ensure that floating point numbers
will always have a dot as the decimal separator.

src/xz/args.c

index bb6e27bb79956bc004d2f1a75d0b4ba6ec9ca323..393ba6aad45df75884ba781909ab93c886c09186 100644 (file)
@@ -222,6 +222,10 @@ parse_real(args_info *args, int argc, char **argv)
                // --robot
                case OPT_ROBOT:
                        opt_robot = true;
+
+                       // This is to make sure that floating point numbers
+                       // always have a dot as decimal separator.
+                       setlocale(LC_NUMERIC, "C");
                        break;
 
                case 'z':