[*] AuFS::ReadString shouldn't fail with an empty file
This commit is contained in:
parent
2c3c7b04e5
commit
6f29237b78
@ -353,6 +353,12 @@ namespace Aurora::IO::FS
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fileBuffer.IsEmpty())
|
||||||
|
{
|
||||||
|
buffer.clear();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
return Locale::Encoding::DecodeUTF8(fileBuffer.data(), fileBuffer.size(), buffer, Locale::ECodePage::eUTF8).first != 0;
|
return Locale::Encoding::DecodeUTF8(fileBuffer.data(), fileBuffer.size(), buffer, Locale::ECodePage::eUTF8).first != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user