hiddbg: remove implicit transfer memory creation

This commit is contained in:
ndeadly 2023-02-01 21:41:59 +01:00
parent 7568385a7d
commit 1450757005

View File

@ -478,10 +478,7 @@ Result hiddbgAttachHdlsWorkBuffer(HiddbgHdlsSessionId *session_id, void *buffer,
if (g_hiddbgHdlsInitialized) if (g_hiddbgHdlsInitialized)
return MAKERESULT(Module_Libnx, LibnxError_AlreadyInitialized); return MAKERESULT(Module_Libnx, LibnxError_AlreadyInitialized);
if (buffer==NULL) rc = tmemCreateFromMemory(&g_hiddbgHdlsTmem, buffer, size, Perm_Rw);
rc = tmemCreate(&g_hiddbgHdlsTmem, 0x1000, Perm_Rw);
else
rc = tmemCreateFromMemory(&g_hiddbgHdlsTmem, buffer, size, Perm_Rw);
if (R_FAILED(rc)) return rc; if (R_FAILED(rc)) return rc;
rc = _hiddbgAttachHdlsWorkBuffer(session_id, &g_hiddbgHdlsTmem); rc = _hiddbgAttachHdlsWorkBuffer(session_id, &g_hiddbgHdlsTmem);