diff options
author | Guy Harris <guy@alum.mit.edu> | 2014-12-31 16:46:50 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-01-01 00:47:17 +0000 |
commit | 114e7735b961720e63d2145770ed9b82c0200ff8 (patch) | |
tree | f17269993b85673cef4e7ca9f00b4ee5975c77dc /capinfos.c | |
parent | a53b67ceb7c1e4b1d53a4853d37386a483cc9ab0 (diff) | |
download | wireshark-114e7735b961720e63d2145770ed9b82c0200ff8.tar.gz wireshark-114e7735b961720e63d2145770ed9b82c0200ff8.tar.bz2 wireshark-114e7735b961720e63d2145770ed9b82c0200ff8.zip |
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 'capinfos.c')
-rw-r--r-- | capinfos.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/capinfos.c b/capinfos.c index 9d4c2ebebe..083a010a09 100644 --- a/capinfos.c +++ b/capinfos.c @@ -1135,6 +1135,9 @@ main(int argc, char *argv[]) size_t hash_bytes; #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_capinfos_compiled_info); @@ -1402,9 +1405,6 @@ main(int argc, char *argv[]) } } - /* Set the C-language locale to the native environment. */ - setlocale(LC_ALL, ""); - if ((argc - optind) < 1) { print_usage(stderr); exit(1); |