Fix compiler warning when service string is exactly 8 characters

This commit is contained in:
averne 2019-04-23 21:00:24 +09:00
parent 79bc9bf8d8
commit 551181f53a

View File

@ -37,7 +37,7 @@ class MitmServer : public IWaitable {
Handle query_h = 0; Handle query_h = 0;
DoWithSmMitmSession([&]() { DoWithSmMitmSession([&]() {
strncpy(mitm_name, service_name, 8); strncpy(mitm_name, service_name, 9);
mitm_name[8] = '\x00'; mitm_name[8] = '\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();