Skip to content

Commit 67345f8

Browse files
committed
Long multibyte sequence support in make_utf8_path
1 parent 88fbea3 commit 67345f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/port/path.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -782,7 +782,7 @@ const wchar_t* make_wc_name(const char* name) {
782782
const char* make_utf8_path(const wchar_t* s) {
783783
int len;
784784
size_t size = (size_t)wcslen(s) + 1;
785-
char *p = (char*)malloc(size * sizeof(wchar_t));
785+
char *p = (char*)malloc(size * 6);
786786
len = WideCharToMultiByte(CP_UTF8,0,s,size,p,size * sizeof(wchar_t),NULL,NULL);
787787
return p;
788788
}

0 commit comments

Comments
 (0)