diff --git a/dll/win32/shell32/shlfileop.cpp b/dll/win32/shell32/shlfileop.cpp index f90f3265773..475aee0421a 100644 --- a/dll/win32/shell32/shlfileop.cpp +++ b/dll/win32/shell32/shlfileop.cpp @@ -29,7 +29,11 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell); #define IsAttrib(x, y) ((INVALID_FILE_ATTRIBUTES != (x)) && ((x) & (y))) #define IsAttribFile(x) (!((x) & FILE_ATTRIBUTE_DIRECTORY)) #define IsAttribDir(x) IsAttrib(x, FILE_ATTRIBUTE_DIRECTORY) -#define IsDotDir(x) ((x[0] == '.') && ((x[1] == 0) || ((x[1] == '.') && (x[2] == 0)))) +#ifdef __REACTOS__ + #define IsDotDir(x) ((x) && (x[0] == '.') && ((x[1] == 0) || ((x[1] == '.') && (x[2] == 0)))) +#else + #define IsDotDir(x) ((x[0] == '.') && ((x[1] == 0) || ((x[1] == '.') && (x[2] == 0)))) +#endif #define FO_MASK 0xF diff --git a/modules/rostests/winetests/kernel32/file.c b/modules/rostests/winetests/kernel32/file.c index ee91e62e419..79b7918ba71 100644 --- a/modules/rostests/winetests/kernel32/file.c +++ b/modules/rostests/winetests/kernel32/file.c @@ -1850,7 +1850,11 @@ static void test_DeleteFileW( void ) ok(ret == TRUE, "expected to remove directory deletefile\n"); } -#define IsDotDir(x) ((x[0] == '.') && ((x[1] == 0) || ((x[1] == '.') && (x[2] == 0)))) +#ifdef __REACTOS__ + #define IsDotDir(x) ((x) && (x[0] == '.') && ((x[1] == 0) || ((x[1] == '.') && (x[2] == 0)))) +#else + #define IsDotDir(x) ((x[0] == '.') && ((x[1] == 0) || ((x[1] == '.') && (x[2] == 0)))) +#endif static void test_MoveFileA(void) {