Merge /home/maan/scm/paraslash.fml/paraslash
[paraslash.git] / random_selector.c
index 123425b..7bf3402 100644 (file)
@@ -40,10 +40,11 @@ static int count_audio_files(__a_unused const char *dir, __a_unused const char *
 
 static int remember_file(const char *dir, const char *name)
 {
-       if (audio_file_count >= num_audio_files)
-               return -E_FILE_COUNT;
-       audio_file_list[audio_file_count] = make_message("%s/%s", dir, name);
-       audio_file_count++;
+       if (audio_file_count < num_audio_files) {
+               audio_file_list[audio_file_count] =
+                       make_message("%s/%s", dir, name);
+               audio_file_count++;
+       }
        return 1;
 }