[*] AuFS::ReadString shouldn't fail with an empty file

This commit is contained in:
Reece Wilson 2024-08-17 16:23:38 +01:00
parent 2c3c7b04e5
commit 6f29237b78

View File

@ -353,6 +353,12 @@ namespace Aurora::IO::FS
return false;
}
if (fileBuffer.IsEmpty())
{
buffer.clear();
return true;
}
return Locale::Encoding::DecodeUTF8(fileBuffer.data(), fileBuffer.size(), buffer, Locale::ECodePage::eUTF8).first != 0;
}