Attempt to fix the linux builds

This commit is contained in:
Hamish Milne 2020-03-28 21:40:18 +00:00
parent de9ae14059
commit 841255cd16
2 changed files with 2 additions and 2 deletions

View file

@ -35,7 +35,7 @@ add_library(audio_core STATIC
create_target_directory_groups(audio_core) create_target_directory_groups(audio_core)
target_link_libraries(audio_core PUBLIC common core) target_link_libraries(audio_core PUBLIC common)
target_link_libraries(audio_core PRIVATE SoundTouch teakra) target_link_libraries(audio_core PRIVATE SoundTouch teakra)
if(ENABLE_MF) if(ENABLE_MF)

View file

@ -12,7 +12,7 @@ std::size_t DirectRomFSReader::ReadFile(std::size_t offset, std::size_t length,
if (length == 0) if (length == 0)
return 0; // Crypto++ does not like zero size buffer return 0; // Crypto++ does not like zero size buffer
file.Seek(file_offset + offset, SEEK_SET); file.Seek(file_offset + offset, SEEK_SET);
std::size_t read_length = std::min(length, data_size - offset); std::size_t read_length = std::min(length, static_cast<std::size_t>(data_size) - offset);
read_length = file.ReadBytes(buffer, read_length); read_length = file.ReadBytes(buffer, read_length);
if (is_encrypted) { if (is_encrypted) {
CryptoPP::CTR_Mode<CryptoPP::AES>::Decryption d(key.data(), key.size(), ctr.data()); CryptoPP::CTR_Mode<CryptoPP::AES>::Decryption d(key.data(), key.size(), ctr.data());