Commit b464f1c4 authored by nanahira's avatar nanahira

catchup

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