projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix 'Duplicate Session' on Windows, broken during the config revamp.
[u/mdw/putty]
/
unix
/
uxucs.c
diff --git
a/unix/uxucs.c
b/unix/uxucs.c
index
8359553
..
071ecfc
100644
(file)
--- a/
unix/uxucs.c
+++ b/
unix/uxucs.c
@@
-26,8
+26,9
@@
int mb_to_wc(int codepage, int flags, char *mbstr, int mblen,
{
if (codepage == DEFAULT_CODEPAGE) {
int n = 0;
{
if (codepage == DEFAULT_CODEPAGE) {
int n = 0;
- mbstate_t state
= { 0 }
;
+ mbstate_t state;
+ memset(&state, 0, sizeof state);
setlocale(LC_CTYPE, "");
while (mblen > 0) {
setlocale(LC_CTYPE, "");
while (mblen > 0) {
@@
-68,9
+69,10
@@
int wc_to_mb(int codepage, int flags, wchar_t *wcstr, int wclen,
if (codepage == DEFAULT_CODEPAGE) {
char output[MB_LEN_MAX];
if (codepage == DEFAULT_CODEPAGE) {
char output[MB_LEN_MAX];
- mbstate_t state
= { 0 }
;
+ mbstate_t state;
int n = 0;
int n = 0;
+ memset(&state, 0, sizeof state);
setlocale(LC_CTYPE, "");
while (wclen > 0) {
setlocale(LC_CTYPE, "");
while (wclen > 0) {
@@
-137,7
+139,7
@@
int init_ucs(struct unicode_data *ucsdata, char *linecharset,
/*
* Failing that, line_codepage should be decoded from the
/*
* Failing that, line_codepage should be decoded from the
- * specification in c
fg
.
+ * specification in c
onf
.
*/
if (ucsdata->line_codepage == CS_NONE)
ucsdata->line_codepage = decode_codepage(linecharset);
*/
if (ucsdata->line_codepage == CS_NONE)
ucsdata->line_codepage = decode_codepage(linecharset);