diff --git a/rpcs3/Emu/Cell/Modules/cellVoice.cpp b/rpcs3/Emu/Cell/Modules/cellVoice.cpp index 7794a9cce3..40a9bee996 100644 --- a/rpcs3/Emu/Cell/Modules/cellVoice.cpp +++ b/rpcs3/Emu/Cell/Modules/cellVoice.cpp @@ -178,10 +178,11 @@ error_code cellVoiceCreatePort(vm::ptr portId, vm::cptr { verify(HERE), ctr2 < CELLVOICE_MAX_PORT + 1; - std::tie(port, success) = manager->ports.try_emplace((ctr2 << 8) | manager->id_ctr); + std::tie(port, success) = manager->ports.try_emplace(::narrow((ctr2 << 8) | manager->id_ctr)); } port->second.info = *pArg; + *portId = port->first; return CELL_OK; }