if ifs uses unicode, i have to alloc twice memory
example
when ifs_strlen return 10 ;
it is really 20 byte;
so
TCHAR ifs_path;
len=strlen(path);
len = len << 2; // twice
ifs_path = ifs_malloc(len);
strncpy(ifs_path,L"mfm",sizeof(L"mfm"));
ifs_path = ifs_path+sizeof(L"mfm")); // increase
strcpy(ifs_path,path);
example
when ifs_strlen return 10 ;
it is really 20 byte;
so
TCHAR ifs_path;
len=strlen(path);
len = len << 2; // twice
ifs_path = ifs_malloc(len);
strncpy(ifs_path,L"mfm",sizeof(L"mfm"));
ifs_path = ifs_path+sizeof(L"mfm")); // increase
strcpy(ifs_path,path);
댓글