summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Grenville <pyxlcy@gmail.com>2013-09-14 10:04:38 +0800
committerRichard Grenville <pyxlcy@gmail.com>2013-09-14 10:04:38 +0800
commit631f50d665057a034d4cd22b49e030d1913ab79a (patch)
tree8c6dcc018d7a27309e2980b1ec8c1b27a8510f4d
parent7e488d813c7d32e9226097bb1c519a9fd1e60333 (diff)
downloadtdebase-631f50d665057a034d4cd22b49e030d1913ab79a.tar.gz
tdebase-631f50d665057a034d4cd22b49e030d1913ab79a.zip
Bug fix #143: Move setlocale(LC_NUMERIC, "C")
Move setlocale(LC_NUMERIC, "C") to a better place, in hope to fix #143. Thanks to hiciu for reporting!
-rw-r--r--compton.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/compton.c b/compton.c
index 92378b047..23e86dd32 100644
--- a/compton.c
+++ b/compton.c
@@ -5390,16 +5390,16 @@ get_cfg(session_t *ps, int argc, char *const *argv, bool first_pass) {
ps->o.wintype_opacity[i] = 1.0;
}
+ // Enforce LC_NUMERIC locale "C" here to make sure dots are recognized
+ // instead of commas in atof().
+ setlocale(LC_NUMERIC, "C");
+
#ifdef CONFIG_LIBCONFIG
parse_config(ps, &cfgtmp);
#endif
// Parse commandline arguments. Range checking will be done later.
- // Enforce LC_NUMERIC locale "C" here to make sure dots are recognized
- // instead of commas in atof().
- setlocale(LC_NUMERIC, "C");
-
optind = 1;
while (-1 !=
(o = getopt_long(argc, argv, shortopts, longopts, &longopt_idx))) {