ams: fix compilation with gcc 13

This commit is contained in:
Michael Scire authored and SciresM committed 2023-05-07 03:36:46 -07:00
1 parent ed9e60acb9
commit 1f5ec68a5c
8 files changed
+8 -28

No files matched your search

@@ -251,12 +251,11 @@ namespace ams::mitm::fs {
using DirectoryTableWriter = TableWriter<DirectoryEntry>;
using FileTableWriter = TableWriter<FileEntry>;
constexpr inline u32 CalculatePathHash(u32 parent, const char *_path, u32 start, size_t path_len) {
const unsigned char *path = reinterpret_cast<const unsigned char *>(_path);
constexpr inline u32 CalculatePathHash(u32 parent, const char *path, u32 start, size_t path_len) {
u32 hash = parent ^ 123456789;
for (size_t i = 0; i < path_len; i++) {
hash = (hash >> 5) | (hash << 27);
hash ^= path[start + i];
hash ^= static_cast<unsigned char>(path[start + i]);
}
return hash;
}