Fix the name and description truncation issue in a cleaner way.
This commit is contained in:
parent
4f531fe122
commit
12a606501c
|
@ -155,14 +155,7 @@ public:
|
||||||
Do(stringLen);
|
Do(stringLen);
|
||||||
|
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case MODE_READ:
|
case MODE_READ: x.assign((wchar_t*)*ptr, stringLen / sizeof(wchar_t)); break;
|
||||||
{
|
|
||||||
wchar_t* tmp = new wchar_t[stringLen / sizeof(wchar_t)];
|
|
||||||
memcpy(tmp, *ptr, stringLen);
|
|
||||||
x = tmp;
|
|
||||||
delete[] tmp;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case MODE_WRITE: memcpy(*ptr, x.c_str(), stringLen); break;
|
case MODE_WRITE: memcpy(*ptr, x.c_str(), stringLen); break;
|
||||||
case MODE_MEASURE: break;
|
case MODE_MEASURE: break;
|
||||||
case MODE_VERIFY: _dbg_assert_msg_(COMMON, x == (wchar_t*)*ptr, "Savestate verification failure: \"%ls\" != \"%ls\" (at %p).\n", x.c_str(), (wchar_t*)*ptr, ptr); break;
|
case MODE_VERIFY: _dbg_assert_msg_(COMMON, x == (wchar_t*)*ptr, "Savestate verification failure: \"%ls\" != \"%ls\" (at %p).\n", x.c_str(), (wchar_t*)*ptr, ptr); break;
|
||||||
|
|
Loading…
Reference in New Issue