diff options
author | George Hazan <ghazan@miranda.im> | 2019-02-28 20:00:53 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-02-28 20:00:53 +0300 |
commit | 2e9d13165b4fd765d95f88d26282be022e708b0d (patch) | |
tree | d9b65c84d86a5c1c74dbd944c08350c0c781dc95 /plugins/MirOTR/src/otrlextensions.c | |
parent | 62116c7d1c0d4def03c0331688a63ee6144f8363 (diff) |
MirOTR:
- fix for Unicode file names;
- fix for reading utf8 strings from Windows GUI;
- contact_get_id: unused second parameter removed;
- contact_get_id: result is encoded in utf8, thus preventing from errors;
Diffstat (limited to 'plugins/MirOTR/src/otrlextensions.c')
-rw-r--r-- | plugins/MirOTR/src/otrlextensions.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/MirOTR/src/otrlextensions.c b/plugins/MirOTR/src/otrlextensions.c index da68e73354..ddf0248bb7 100644 --- a/plugins/MirOTR/src/otrlextensions.c +++ b/plugins/MirOTR/src/otrlextensions.c @@ -55,7 +55,7 @@ static gcry_error_t account_write(FILE* privf, const char* accountname, const char* protocol, gcry_sexp_t privkey) { gcry_error_t err; - gcry_sexp_t names, protos; + gcry_sexp_t names, protos = 0; fprintf(privf, " (account\n"); @@ -97,7 +97,7 @@ gcry_error_t otrl_privkey_write_FILEp(OtrlUserState us, FILE* privf) } /* Store all keys of an OtrlUserState. */ -gcry_error_t otrl_privkey_write(OtrlUserState us, const char* filename) +gcry_error_t otrl_privkey_write(OtrlUserState us, const wchar_t *filename) { gcry_error_t err; FILE* privf; @@ -108,7 +108,7 @@ gcry_error_t otrl_privkey_write(OtrlUserState us, const char* filename) #ifndef WIN32 oldmask = umask(077); #endif - privf = fopen(filename, "w+b"); + privf = _wfopen(filename, L"w+b"); if (!privf) { #ifndef WIN32 umask(oldmask); |