mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-24 19:54:22 -04:00
libstrat: fix bugs/compiler warnings
This commit is contained in:
parent
70e67da1e1
commit
0a53c74aad
8 changed files with 31 additions and 21 deletions
|
@ -75,6 +75,7 @@ namespace ams::erpt::srv {
|
|||
auto file_guard = SCOPE_GUARD { if (mode == StreamMode_Write) { fs::CloseFile(this->file_handle); } };
|
||||
|
||||
std::strncpy(this->file_name, path, sizeof(this->file_name));
|
||||
this->file_name[sizeof(this->file_name) - 1] = '\x00';
|
||||
|
||||
this->buffer = reinterpret_cast<u8 *>(Allocate(buffer_size));
|
||||
R_UNLESS(this->buffer != nullptr, erpt::ResultOutOfMemory());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue