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.
This commit is contained in:
Clark Wang
2024-08-02 12:25:13 +02:00
committed by Alexander Naumov
parent 7ebc476b79
commit 89d2776abf

View File

@@ -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);