Split GetPointer into two versions, to help with const correctness

This commit is contained in:
Henrik Rydgård committed 2022-07-24 13:26:19 +02:00
1 parent d2a3918f5f
commit e6403d7157
43 files changed
+169 -156

No files matched your search

+1 -1
View File
@@ -1263,7 +1263,7 @@ void notifyMatchingHandler(SceNetAdhocMatchingContext * context, ThreadMessage *
MatchingArgs argsNew = { 0 };
u32_le dataBufLen = msg->optlen + 8; //max(bufLen, msg->optlen + 8);
u32_le dataBufAddr = userMemory.Alloc(dataBufLen); // We will free this memory after returning from mipscall. FIXME: Are these buffers supposed to be taken/pre-allocated from the memory pool during sceNetAdhocMatchingInit?
uint8_t * dataPtr = Memory::GetPointer(dataBufAddr);
uint8_t * dataPtr = Memory::GetPointerWrite(dataBufAddr);
if (dataPtr) {
memcpy(dataPtr, &msg->mac, sizeof(msg->mac));
if (msg->optlen > 0)