aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2021-01-28 22:21:42 +0200
committerArnold D. Robbins <arnold@skeeve.com>2021-01-28 22:21:42 +0200
commit6c8aa0845f91038e08ff48f668d9c4318b93b114 (patch)
tree8950d7d9875abb8903e31c1daf016f5610ff0b24
parente02e38ad7bd54ced8baa24cca6e931a62b0c1deb (diff)
downloadegawk-6c8aa0845f91038e08ff48f668d9c4318b93b114.tar.gz
egawk-6c8aa0845f91038e08ff48f668d9c4318b93b114.tar.bz2
egawk-6c8aa0845f91038e08ff48f668d9c4318b93b114.zip
Fix a bug with -b option.
-rw-r--r--ChangeLog7
-rw-r--r--main.c5
2 files changed, 10 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index ad396031..24175adb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2021-01-28 Arnold D. Robbins <arnold@skeeve.com>
+
+ Fix a Day One Bug!
+
+ * main.c (main): For -b option, only set LC_ALL to C if
+ not --posix. Ooops.
+
2021-01-09 Arnold D. Robbins <arnold@skeeve.com>
Fix problems turning something like 018 into decimal.
diff --git a/main.c b/main.c
index ea3b3a59..5b153bc3 100644
--- a/main.c
+++ b/main.c
@@ -359,11 +359,12 @@ main(int argc, char **argv)
if (do_binary) {
if (do_posix)
warning(_("`--posix' overrides `--characters-as-bytes'"));
- else
+ else {
gawk_mb_cur_max = 1; /* hands off my data! */
#if defined(LC_ALL)
- setlocale(LC_ALL, "C");
+ setlocale(LC_ALL, "C");
#endif
+ }
}
if (do_lint && os_is_setuid())