aboutsummaryrefslogtreecommitdiffstats
path: root/captype.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-12-31 16:46:50 -0800
committerGuy Harris <guy@alum.mit.edu>2015-01-01 00:47:17 +0000
commit114e7735b961720e63d2145770ed9b82c0200ff8 (patch)
treef17269993b85673cef4e7ca9f00b4ee5975c77dc /captype.c
parenta53b67ceb7c1e4b1d53a4853d37386a483cc9ab0 (diff)
Call setlocale() before getting version information.
That way, the setlocale() call used to get the current locale will get the right answer. Change-Id: Ib43e16a9d98d08e5ddaff81fd3235f5b64d7b95b Reviewed-on: https://code.wireshark.org/review/6197 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'captype.c')
-rw-r--r--captype.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/captype.c b/captype.c
index bc09e2d777..53c8f08e93 100644
--- a/captype.c
+++ b/captype.c
@@ -139,6 +139,9 @@ main(int argc, char *argv[])
char *init_progfile_dir_error;
#endif
+ /* Set the C-language locale to the native environment. */
+ setlocale(LC_ALL, "");
+
/* Get the compile-time version information string */
comp_info_str = get_compiled_version_info(NULL, get_captype_compiled_info);
@@ -211,9 +214,6 @@ main(int argc, char *argv[])
}
}
- /* Set the C-language locale to the native environment. */
- setlocale(LC_ALL, "");
-
if (argc < 2) {
print_usage(stderr);
return 1;