diff --git a/rpcs3/Emu/Cell/Modules/sceNp.cpp b/rpcs3/Emu/Cell/Modules/sceNp.cpp index 5bd991fa92d2..ba9aadec3036 100644 --- a/rpcs3/Emu/Cell/Modules/sceNp.cpp +++ b/rpcs3/Emu/Cell/Modules/sceNp.cpp @@ -4596,24 +4596,24 @@ error_code sceNpUtilCmpNpId(vm::ptr id1, vm::ptr id2) } // Unknown what this constant means - // if (id1->reserved[0] != 1 || id2->reserved[0] != 1) - // { - // return SCE_NP_UTIL_ERROR_INVALID_NP_ID; - // } + if (id1->reserved[0] != 1 || id2->reserved[0] != 1) + { + return SCE_NP_UTIL_ERROR_INVALID_NP_ID; + } - if (strcmp(id1->handle.data, id2->handle.data))// || id1->unk1[0] != id2->unk1[0]) + if (strncmp(id1->handle.data, id2->handle.data, 16) || id1->unk1[0] != id2->unk1[0]) { return SCE_NP_UTIL_ERROR_NOT_MATCH; } - // if (id1->unk1[1] != id2->unk1[1]) - // { - // // If either is zero they match - // if (id1->opt[4] && id2->opt[4]) - // { - // return SCE_NP_UTIL_ERROR_NOT_MATCH; - // } - // } + if (id1->unk1[1] != id2->unk1[1]) + { + // If either is zero they match + if (id1->opt[4] && id2->opt[4]) + { + return SCE_NP_UTIL_ERROR_NOT_MATCH; + } + } return CELL_OK; } diff --git a/rpcs3/Emu/NP/np_handler.cpp b/rpcs3/Emu/NP/np_handler.cpp index 917ca191ac3f..d90911eef05e 100644 --- a/rpcs3/Emu/NP/np_handler.cpp +++ b/rpcs3/Emu/NP/np_handler.cpp @@ -137,6 +137,7 @@ void np_handler::init_NP(u32 poolsize, vm::ptr poolptr) ASSERT(s_npid != ""); // It should be generated in settings window if empty strcpy_trunc(npid.handle.data, s_npid); + npid.reserved[0] = 1; } switch (g_cfg.net.psn_status)