break;
}
- if (*counter_var != 0 && actual_counter >= *counter_var + delay)
+ if (*counter_var != 0 &&
+ delay != 0 &&
+ actual_counter >= *counter_var + delay)
{
int lag = actual_counter - (*counter_var + delay);
int delay2 = (delay + 1) / 2;
dir->dir_entry->is_directory =
(stat(dir->dir_entry->filename, &file_status) == 0 &&
- (file_status.st_mode & S_IFMT) == S_IFDIR);
+ S_ISDIR(file_status.st_mode));
return dir->dir_entry;
}
struct stat file_status;
boolean success = (stat(dir_name, &file_status) == 0 &&
- (file_status.st_mode & S_IFMT) == S_IFDIR);
+ S_ISDIR(file_status.st_mode));
#if defined(PLATFORM_ANDROID)
if (!success)