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

minor update

parent b93d3b16
......@@ -53,10 +53,9 @@ void DuelInfo::Clear() {
bool IsExtension(const wchar_t* filename, const wchar_t* extension) {
int flen = std::wcslen(filename);
int elen = std::wcslen(extension);
if (!flen || !elen || flen < elen)
if (!elen || flen < elen)
return false;
auto fend = filename + flen;
return !mywcsncasecmp(fend - elen, extension, elen);
return !mywcsncasecmp(filename + (flen - elen), extension, elen);
}
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