sys_fs: Further implemented cellFsArcadeHddSerialNumber (0xc0000007)

This commit is contained in:
brian218 2023-05-02 23:57:39 +08:00 committed by Ivan
parent 5696065727
commit 6a41b22a1b
4 changed files with 31 additions and 8 deletions

View file

@ -15,7 +15,7 @@ std::u16string utf8_to_utf16(std::string_view src);
// Copy null-terminated string from a std::string or a char array to a char array with truncation
template <typename D, typename T>
inline void strcpy_trunc(D& dst, const T& src)
inline void strcpy_trunc(D&& dst, const T& src)
{
const usz count = std::size(src) >= std::size(dst) ? std::max<usz>(std::size(dst), 1) - 1 : std::size(src);
std::memcpy(std::data(dst), std::data(src), count);