Commit 27972fab authored by Chen Bill's avatar Chen Bill

minor update

parent b93d3b16
...@@ -53,10 +53,9 @@ void DuelInfo::Clear() { ...@@ -53,10 +53,9 @@ void DuelInfo::Clear() {
bool IsExtension(const wchar_t* filename, const wchar_t* extension) { bool IsExtension(const wchar_t* filename, const wchar_t* extension) {
int flen = std::wcslen(filename); int flen = std::wcslen(filename);
int elen = std::wcslen(extension); int elen = std::wcslen(extension);
if (!flen || !elen || flen < elen) if (!elen || flen < elen)
return false; return false;
auto fend = filename + flen; return !mywcsncasecmp(filename + (flen - elen), extension, elen);
return !mywcsncasecmp(fend - elen, extension, elen);
} }
bool Game::Initialize() { bool Game::Initialize() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment