diff options
| author | Glenn Rice <glennricster@gmail.com> | 2013-01-03 19:21:20 -0600 |
|---|---|---|
| committer | Glenn Rice <glennricster@gmail.com> | 2013-01-03 19:21:20 -0600 |
| commit | 12a606501c108de1c513f4aacf4e345fe077bd8d (patch) | |
| tree | 7121943f17a0aee42db447e55c36156336457911 /Source/Core/Common | |
| parent | 4f531fe1229b2f18b17feb82f12f0a75b0a781eb (diff) | |
Fix the name and description truncation issue in a cleaner way.
Diffstat (limited to 'Source/Core/Common')
| -rw-r--r-- | Source/Core/Common/Src/ChunkFile.h | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/Source/Core/Common/Src/ChunkFile.h b/Source/Core/Common/Src/ChunkFile.h index e26536735d..5a6f26e7c3 100644 --- a/Source/Core/Common/Src/ChunkFile.h +++ b/Source/Core/Common/Src/ChunkFile.h @@ -155,14 +155,7 @@ public: Do(stringLen); switch (mode) { - case MODE_READ: - { - wchar_t* tmp = new wchar_t[stringLen / sizeof(wchar_t)]; - memcpy(tmp, *ptr, stringLen); - x = tmp; - delete[] tmp; - } - break; + case MODE_READ: x.assign((wchar_t*)*ptr, stringLen / sizeof(wchar_t)); break; case MODE_WRITE: memcpy(*ptr, x.c_str(), stringLen); 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; |
