diff options
author | Rob Landley <rob@landley.net> | 2014-09-20 17:51:23 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2014-09-20 17:51:23 -0500 |
commit | 9b14cb6b12e6f1b07a1ad401e5cb6e091df4ac2f (patch) | |
tree | 381ab8b66cb4b1f5a93b09fb870ef18c3d8a0dae | |
parent | 94a4603481b9fc663a72549b4cd0dcbd95fca062 (diff) | |
download | toybox-9b14cb6b12e6f1b07a1ad401e5cb6e091df4ac2f.tar.gz |
Always call setlocale if I18N is enabled, so nested toy_exec() can switch it back off if necessary.
-rw-r--r-- | main.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -66,7 +66,7 @@ static void toy_singleinit(struct toy_list *which, char *argv[]) toys.which = which; toys.argv = argv; - if (CFG_TOYBOX_I18N && (which->flags & TOYFLAG_LOCALE)) setlocale(LC_ALL, ""); + if (CFG_TOYBOX_I18N) setlocale(LC_ALL, "C"+!!(which->flags & TOYFLAG_LOCALE)); if (CFG_TOYBOX_HELP_DASHDASH && argv[1] && !strcmp(argv[1], "--help")) { if (toys.which == toy_list && toys.argv[2]) |