MCPcopy Create free account
hub / github.com/aldelaro5/dolphin-memory-engine / writeMemoryFromString

Method writeMemoryFromString

Source/MemoryWatch/MemWatchEntry.cpp:399–416  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

397}
398
399Common::MemOperationReturnCode MemWatchEntry::writeMemoryFromString(const std::string& inputString)
400{
401 Common::MemOperationReturnCode writeReturn = Common::MemOperationReturnCode::OK;
402 size_t sizeToWrite = 0;
403 char* buffer = Common::formatStringToMemory(writeReturn, sizeToWrite, inputString, m_base, m_type,
404 m_length, m_consoleAddress);
405 if (writeReturn != Common::MemOperationReturnCode::OK)
406 return writeReturn;
407
408 writeReturn = writeMemoryToRAM(buffer, sizeToWrite);
409 if (writeReturn == Common::MemOperationReturnCode::OK)
410 {
411 if (m_lock)
412 std::memcpy(m_freezeMemory, buffer, m_freezeMemSize);
413 }
414 delete[] buffer;
415 return writeReturn;
416}
417
418void MemWatchEntry::readFromJson(const QJsonObject& json)
419{

Callers 1

editDataMethod · 0.80

Calls 1

formatStringToMemoryFunction · 0.85

Tested by

no test coverage detected