From ebff718526b8be5b5cff6354bdb0193dbd3caddc Mon Sep 17 00:00:00 2001 From: kichik Date: Sat, 23 Apr 2005 19:22:01 +0000 Subject: [PATCH] simpler OEM conversion git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3991 212acab6-be3b-0410-9dea-997c60f758d6 --- Contrib/zip2exe/main.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Contrib/zip2exe/main.cpp b/Contrib/zip2exe/main.cpp index 08d9fdc9..5fbb5953 100644 --- a/Contrib/zip2exe/main.cpp +++ b/Contrib/zip2exe/main.cpp @@ -168,7 +168,6 @@ int tempzip_make(HWND hwndDlg, char *fn) g_extracting=1; do { char filename[MAX_PATH]; - WCHAR filenameW[MAX_PATH]; unz_file_info info; unzGetCurrentFileInfo(f,&info,filename,sizeof(filename),NULL,0,NULL,0); @@ -176,11 +175,7 @@ int tempzip_make(HWND hwndDlg, char *fn) // was zip created on MS-DOS/Windows? if ((info.version & 0xFF00) == 0) { - // convert from OEM codepage to ANSI codepage - if (MultiByteToWideChar(CP_OEMCP, 0, filename, -1, filenameW, MAX_PATH)) - { - WideCharToMultiByte(CP_ACP, 0, filenameW, -1, filename, MAX_PATH, "-", NULL); - } + OemToCharBuff(filename, filename, strlen(filename)); } if (filename[0] &&