From bed074c6ece0a2703dc3b240859a029c0dc5688c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=81=8D=E5=85=AE=E6=83=9A=E5=85=AE?= <101191390+HIllya51@users.noreply.github.com> Date: Sun, 18 Feb 2024 11:56:40 +0800 Subject: [PATCH] issues/521 --- plugins/shareddllproxy/jbj7.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/plugins/shareddllproxy/jbj7.cpp b/plugins/shareddllproxy/jbj7.cpp index 6deb553d..599d9931 100644 --- a/plugins/shareddllproxy/jbj7.cpp +++ b/plugins/shareddllproxy/jbj7.cpp @@ -4,7 +4,7 @@ #include #include #include - +#include #define CODEPAGE_JA 932 #define CODEPAGE_GB 936 @@ -43,8 +43,16 @@ int jbjwmain(int argc, wchar_t* argv[]) int MAX_USERDIC_COUNT = 3; int USERDIC_BUFFER_SIZE = USERDIC_PATH_SIZE * MAX_USERDIC_COUNT;// 1548, sizeof(wchar_t) wchar_t cache[1548] = { 0 }; + int __i=0; + for (int i = 4; i < argc; i++) { - wcscpy(cache + (i - 4) * USERDIC_PATH_SIZE, argv[i]); + wchar_t _[MAX_PATH]; + wcscpy(_,argv[i]);wcscat(_,L".DIC"); + if(PathFileExistsW(_)) + { + wcscpy(cache + __i * USERDIC_PATH_SIZE, argv[i]); + __i++; + } } DJC_OpenAllUserDic_Unicode(cache, 0); wchar_t* fr = new wchar_t[3000];