GCC nonstring fixes

This commit is contained in:
Luke Street 2020-10-21 00:44:45 -04:00
parent 4ee594d0fd
commit 6f5cb6f972
2 changed files with 4 additions and 1 deletions

View File

@ -18,6 +18,9 @@ class File {
std::array<uint8_t, 2> m_maker; std::array<uint8_t, 2> m_maker;
uint8_t m_reserved; uint8_t m_reserved;
uint8_t m_bannerFlags; uint8_t m_bannerFlags;
#if __GNUC__ && !__clang__
__attribute__((nonstring))
#endif
char m_filename[0x20]; char m_filename[0x20];
uint32_t m_modifiedTime; uint32_t m_modifiedTime;
uint32_t m_iconAddress; uint32_t m_iconAddress;

View File

@ -107,7 +107,7 @@ File* Directory::getFile(const char* game, const char* maker, const char* filena
return false; return false;
} }
return std::strcmp(file.m_filename, filename) == 0; return std::strncmp(file.m_filename, filename, 32) == 0;
}); });
if (iter == data.m_files.cend()) { if (iter == data.m_files.cend()) {