--- np2/generic/hostdrvs.c 2005/03/18 09:23:10 1.15 +++ np2/generic/hostdrvs.c 2011/01/15 18:04:43 1.17 @@ -75,12 +75,13 @@ static void rcnvfcb(char *dst, UINT dlen } } -static BRESULT realname2fcb(char *fcbname, FLINFO *fli) { +static BRESULT realname2fcb(char *fcbname, const FLINFO *fli) { OEMCHAR *ext; #if defined(OSLANG_EUC) || defined(OSLANG_UTF8) || defined(OSLANG_UCS2) char sjis[MAX_PATH]; #endif + OEMCHAR filename[MAX_PATH]; FillMemory(fcbname, 11, ' '); @@ -92,14 +93,14 @@ static BRESULT realname2fcb(char *fcbnam rcnvfcb(fcbname+8, 3, ext); #endif - file_cutext(fli->path); + file_cpyname(filename, fli->path, NELEMENTS(filename)); + file_cutext(filename); #if defined(OSLANG_EUC) || defined(OSLANG_UTF8) || defined(OSLANG_UCS2) - oemtext_oemtosjis(sjis, sizeof(sjis), fli->path, (UINT)-1); + oemtext_oemtosjis(sjis, sizeof(sjis), filename, (UINT)-1); rcnvfcb(fcbname+0, 8, sjis); #else - rcnvfcb(fcbname+0, 8, fli->path); + rcnvfcb(fcbname+0, 8, filename); #endif - return(SUCCESS); } @@ -120,7 +121,7 @@ static BOOL hddseadir(void *vpItem, void return(FALSE); } -LISTARRAY hostdrvs_getpathlist(const OEMCHAR *realpath) { +LISTARRAY hostdrvs_getpathlist(const OEMCHAR *path) { FLISTH flh; FLINFO fli; @@ -128,7 +129,7 @@ LISTARRAY hostdrvs_getpathlist(const OEM char fcbname[11]; HDRVLST hdd; - flh = file_list1st(realpath, &fli); + flh = file_list1st(path, &fli); if (flh == FLISTH_INVALID) { goto hdgpl_err1; }