| 118 | } |
| 119 | |
| 120 | bool 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 | |
| 142 | bool SaveStateBase::FreezeBios() |
| 143 | { |