mirror of
https://github.com/ChronosX88/nesca.git
synced 2024-12-25 09:01:47 +00:00
JP-symbols negative fix.
This commit is contained in:
parent
a17ba5a4b2
commit
4c8944ece2
26
finder.cpp
26
finder.cpp
@ -369,40 +369,20 @@ int ContentFilter(const char *buff, int port, const char *ip, char *cp, int sz)
|
||||
if(buff != NULL)
|
||||
{
|
||||
int res = 0;
|
||||
std::string tempString = "";
|
||||
|
||||
if(strstr(cp, "1251") != NULL)
|
||||
{
|
||||
tempString = toLowerStr(buff);
|
||||
}
|
||||
else
|
||||
{
|
||||
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__)
|
||||
tempString = toLowerStr(xcode(buff, CP_UTF8, CP_ACP).c_str());
|
||||
#else
|
||||
tempString = toLowerStr(buff);
|
||||
#endif
|
||||
};
|
||||
|
||||
char *lBuff = new char[sz + 1];
|
||||
ZeroMemory(lBuff, sz + 1);
|
||||
strcpy(lBuff, tempString.c_str());
|
||||
memset(lBuff + sz, '\0', 1);
|
||||
|
||||
if(sz <= 500)
|
||||
{
|
||||
res = _mainFinderFirst(lBuff, 1, port, ip, sz);
|
||||
res = _mainFinderFirst(toLowerStr(buff).c_str(), 1, port, ip, sz);
|
||||
}
|
||||
else if((sz > 500 && sz <= 3500) || sz > 180000)
|
||||
{
|
||||
res = _mainFinderFirst(lBuff, 0, port, ip, sz);
|
||||
res = _mainFinderFirst(toLowerStr(buff).c_str(), 0, port, ip, sz);
|
||||
}
|
||||
else if(sz > 3500 && sz <= 180000)
|
||||
{
|
||||
res = _mainFinderSecond(lBuff, port, ip);
|
||||
res = _mainFinderSecond(toLowerStr(buff).c_str(), port, ip);
|
||||
};
|
||||
|
||||
delete []lBuff;
|
||||
return res;
|
||||
}
|
||||
else return -1;
|
||||
|
@ -1,3 +1,4 @@
|
||||
エラー
|
||||
pagerror
|
||||
Error report
|
||||
電話
|
||||
|
Loading…
Reference in New Issue
Block a user