Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make sure the null character is not included in the string.
  • Loading branch information
glennricster committed Jan 4, 2013
1 parent 12a6065 commit 9b51c99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/Core/Common/Src/ChunkFile.h
Expand Up @@ -155,7 +155,7 @@ class PointerWrap
Do(stringLen);

switch (mode) {
case MODE_READ: x.assign((wchar_t*)*ptr, stringLen / sizeof(wchar_t)); break;
case MODE_READ: x.assign((wchar_t*)*ptr, (stringLen / sizeof(wchar_t)) - 1); 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;
Expand Down

0 comments on commit 9b51c99

Please sign in to comment.