mirror of
https://github.com/Atmosphere-NX/Atmosphere-libs.git
synced 2025-07-05 09:02:15 +02:00
Use sizeof
This commit is contained in:
parent
551181f53a
commit
e7e7f8c2ed
@ -37,8 +37,8 @@ class MitmServer : public IWaitable {
|
|||||||
Handle query_h = 0;
|
Handle query_h = 0;
|
||||||
|
|
||||||
DoWithSmMitmSession([&]() {
|
DoWithSmMitmSession([&]() {
|
||||||
strncpy(mitm_name, service_name, 9);
|
strncpy(mitm_name, service_name, sizeof(mitm_name));
|
||||||
mitm_name[8] = '\x00';
|
mitm_name[sizeof(mitm_name)-1] = '\x00';
|
||||||
if (R_FAILED(smMitMInstall(&this->port_handle, &query_h, mitm_name))) {
|
if (R_FAILED(smMitMInstall(&this->port_handle, &query_h, mitm_name))) {
|
||||||
std::abort();
|
std::abort();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user