MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / PrepBlock

Method PrepBlock

pcsx2/SaveState.cpp:99–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97}
98
99void SaveStateBase::PrepBlock(int size)
100{
101 if (m_error)
102 return;
103
104 const int end = m_idx + size;
105 if (IsSaving())
106 {
107 if (static_cast<u32>(end) >= m_memory.size())
108 m_memory.resize(static_cast<u32>(end));
109 }
110 else
111 {
112 if (m_memory.size() < static_cast<u32>(end))
113 {
114 Console.Error("(SaveStateBase) Buffer overflow in PrepBlock(), expected %d got %zu", end, m_memory.size());
115 m_error = true;
116 }
117 }
118}
119
120bool SaveStateBase::FreezeTag(const char* src)
121{

Callers 3

SaveStateMethod · 0.80

Calls 3

sizeMethod · 0.45
resizeMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected