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

Method FreezeTag

pcsx2/SaveState.cpp:120–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118}
119
120bool SaveStateBase::FreezeTag(const char* src)
121{
122 if (m_error)
123 return false;
124
125 char tagspace[32];
126 pxAssertMsg(std::strlen(src) < (sizeof(tagspace) - 1), "Tag name exceeds the allowed length");
127
128 std::memset(tagspace, 0, sizeof(tagspace));
129 StringUtil::Strlcpy(tagspace, src, sizeof(tagspace));
130 Freeze(tagspace);
131
132 if (std::strcmp(tagspace, src) != 0)
133 {
134 Console.Error(fmt::format("Savestate data corruption detected while reading tag: {}", src));
135 m_error = true;
136 return false;
137 }
138
139 return true;
140}
141
142bool SaveStateBase::FreezeBios()
143{

Callers

nothing calls this directly

Calls 3

StrlcpyFunction · 0.85
formatFunction · 0.50
ErrorMethod · 0.45

Tested by

no test coverage detected