Просмотр исходного кода

vfs: Add unreachable assert to file permissions converter

Zach Hilman 8 лет назад
Родитель
Сommit
aaa8fdea52
1 измененных файлов с 3 добавлено и 1 удалено
  1. 3 1
      src/core/file_sys/vfs_real.cpp

+ 3 - 1
src/core/file_sys/vfs_real.cpp

@@ -6,7 +6,7 @@
 #include <cstddef>
 #include <cstddef>
 #include <iterator>
 #include <iterator>
 #include <utility>
 #include <utility>
-
+#include "common/assert.h"
 #include "common/common_paths.h"
 #include "common/common_paths.h"
 #include "common/logging/log.h"
 #include "common/logging/log.h"
 #include "core/file_sys/vfs_real.h"
 #include "core/file_sys/vfs_real.h"
@@ -29,6 +29,8 @@ static std::string ModeFlagsToString(Mode mode) {
             mode_str = "a";
             mode_str = "a";
         else if (mode & Mode::Write)
         else if (mode & Mode::Write)
             mode_str = "w";
             mode_str = "w";
+        else
+            UNREACHABLE_MSG("Invalid file open mode: {:02X}", static_cast<u8>(mode));
     }
     }
 
 
     mode_str += "b";
     mode_str += "b";