Set LC_NUMERIC=C when --robot is used.

It is to ensure that floating point numbers
will always have a dot as the decimal separator.
This commit is contained in:
Lasse Collin 2010-01-24 22:45:14 +02:00
parent 0dd6d00766
commit ef68dd4a92
1 changed files with 4 additions and 0 deletions

View File

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