From 89d2776abff68b89482e1b9de1ea238bbda5e804 Mon Sep 17 00:00:00 2001 From: Clark Wang Date: Fri, 2 Aug 2024 12:25:13 +0200 Subject: [PATCH] Fix double -U issue When nwin_options.encoding == -1, the 1st "-U" would set nwin_options.encoding=UTF8 and the 2nd "-U" would set nwin_options.encoding=0. --- src/screen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/screen.c b/src/screen.c index b5d91a6..1bb9882 100644 --- a/src/screen.c +++ b/src/screen.c @@ -591,7 +591,7 @@ int main(int argc, char **argv) printf("Screen version %s\n", version); exit(0); case 'U': - nwin_options.encoding = nwin_options.encoding == -1 ? UTF8 : 0; + nwin_options.encoding = UTF8; break; default: exit_with_usage(myname, "Unknown option %s", --ap);