Skip to content

Commit 8269ee3

Browse files
committed
int
1 parent 1bc354d commit 8269ee3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

WinBaseLib/WinTools.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,9 @@ Buffer jbxwl::utf8_to_sjis_byStr(CString str)
177177
Buffer jbxwl::utf8_to_sjis(void* ptr, size_t len)
178178
{
179179
// utf-8 -> unicode
180-
int len_unic = MultiByteToWideChar(CP_UTF8, 0, (LPCCH)ptr, len, NULL, 0);
180+
int len_unic = MultiByteToWideChar(CP_UTF8, 0, (LPCCH)ptr, (int)len, NULL, 0);
181181
wchar_t* buf_unic = new wchar_t[len_unic];
182-
MultiByteToWideChar(CP_UTF8, 0, (LPCCH)ptr, len + 1, buf_unic, len_unic);
182+
MultiByteToWideChar(CP_UTF8, 0, (LPCCH)ptr, (int)len + 1, buf_unic, len_unic);
183183

184184
// unicode -> sjis
185185
int len_sjis = WideCharToMultiByte(CP_THREAD_ACP, 0, buf_unic, -1, NULL, 0, NULL, NULL);
@@ -208,9 +208,9 @@ Buffer jbxwl::sjis_to_utf8_byStr(CString str)
208208
Buffer jbxwl::sjis_to_utf8(void* ptr, size_t len)
209209
{
210210
// sjis -> unicode
211-
int len_unic = MultiByteToWideChar(CP_THREAD_ACP, 0, (LPCCH)ptr, len, NULL, 0);
211+
int len_unic = MultiByteToWideChar(CP_THREAD_ACP, 0, (LPCCH)ptr, (int)len, NULL, 0);
212212
wchar_t* buf_unic = new wchar_t[len_unic];
213-
MultiByteToWideChar(CP_THREAD_ACP, 0, (LPCCH)ptr, len + 1, buf_unic, len_unic);
213+
MultiByteToWideChar(CP_THREAD_ACP, 0, (LPCCH)ptr, (int)len + 1, buf_unic, len_unic);
214214

215215
// unicode -> utf-8
216216
int len_utf8 = WideCharToMultiByte(CP_UTF8, 0, buf_unic, -1, NULL, 0, NULL, NULL);

0 commit comments

Comments
 (0)