diff options
Diffstat (limited to 'ContactsPlus/utils.cpp')
-rw-r--r-- | ContactsPlus/utils.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ContactsPlus/utils.cpp b/ContactsPlus/utils.cpp index 864e3bb..a86cdff 100644 --- a/ContactsPlus/utils.cpp +++ b/ContactsPlus/utils.cpp @@ -512,7 +512,7 @@ TCHAR* __fastcall SRCTranslateT(const char* src, const WCHAR* unibuf) int wchars, err;
wchars = MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, src,
- strlennull(src), NULL, 0);
+ (int)strlennull(src), NULL, 0);
if (wchars == 0) return NULL; // Failure
@@ -523,7 +523,7 @@ TCHAR* __fastcall SRCTranslateT(const char* src, const WCHAR* unibuf) unicode[wchars] = 0;
err = MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, src,
- strlennull(src), unicode, wchars);
+ (int)strlennull(src), unicode, wchars);
if (err != wchars) return NULL; // Failure
return (TCHAR*)TranslateW(unicode);
@@ -738,7 +738,7 @@ static int utf8_decode(const unsigned char *from, char **to) if (bHasCP_UTF8)
{
WCHAR *wszTemp = NULL;
- int inlen = strlennull((char*)from);
+ int inlen = (int)strlennull((char*)from);
wszTemp = (WCHAR *)_alloca(sizeof(WCHAR) * (inlen + 1));
@@ -813,14 +813,14 @@ TCHAR* ansi_to_tchar(const char* src, int codepage) WCHAR *unicode;
int wchars, err;
- wchars = MultiByteToWideChar(codepage, MB_PRECOMPOSED, src, strlennull(src), NULL, 0);
+ wchars = MultiByteToWideChar(codepage, MB_PRECOMPOSED, src, (int)strlennull(src), NULL, 0);
if (wchars == 0) return NULL; // Failure
unicode = (WCHAR*)malloc((wchars + 1) * sizeof(WCHAR));
unicode[wchars] = 0;
- err = MultiByteToWideChar(codepage, MB_PRECOMPOSED, src, strlennull(src), unicode, wchars);
+ err = MultiByteToWideChar(codepage, MB_PRECOMPOSED, src, (int)strlennull(src), unicode, wchars);
if (err != wchars)
{
SAFE_FREE((void**)&unicode);
|