Commit b464f1c4 authored by nanahira's avatar nanahira

catchup

parent c0eaf8e1
......@@ -168,7 +168,7 @@ irr::video::ITexture* ImageManager::GetTextureExpansions(char* file, s32 width,
HANDLE fh = FindFirstFileW(L"./expansions/*", &fdataw);
if(fh != INVALID_HANDLE_VALUE) {
do {
if((fdataw.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) {
if(wcscmp(L".",fdataw.cFileName) != 0 && wcscmp(L"..",fdataw.cFileName) != 0 && fdataw.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
char fname[780];
BufferIO::EncodeUTF8(fdataw.cFileName, fname);
sprintf(fpath, "./expansions/%s", fname);
......@@ -184,7 +184,7 @@ irr::video::ITexture* ImageManager::GetTextureExpansions(char* file, s32 width,
struct dirent * dirp;
if((dir = opendir("./expansions/")) != NULL) {
while((dirp = readdir(dir)) != NULL) {
if (dirp->d_type != DT_DIR)
if (strcmp(".", dirp->d_name) == 0 || strcmp("..", dirp->d_name) == 0 || dirp->d_type != DT_DIR)
continue;
char filepath[1000];
sprintf(filepath, "./expansions/%s/", dirp->d_name);
......
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