diff options
author | Dan Albert <danalbert@google.com> | 2014-07-31 11:31:03 -0700 |
---|---|---|
committer | Dan Albert <danalbert@google.com> | 2014-08-06 13:00:54 -0700 |
commit | 938a8008a61ecb6e975aa974dbf30ea7e1f298e2 (patch) | |
tree | 6ae680c3160fa51cb5cca24ffdbc47545055cf7f /tests | |
parent | 00a8344ae82a691209b665adae828a5abe570cfb (diff) | |
download | bionic-938a8008a61ecb6e975aa974dbf30ea7e1f298e2.tar.gz |
Fix mbsrtowcs(3) src param for finished string.
A mistake I made while cleaning this up the first time through.
mbstrtowcs(3) sets the src param to null if it finishes the string.
Change-Id: I6263646e25d9537043b7025fd1dd6ae195f365e2
(cherry picked from commit b6cc8e00cd562bd0f81fe44a6bc646540a862f32)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/wchar_test.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/wchar_test.cpp b/tests/wchar_test.cpp index f052ce6f1..d02c4bf2f 100644 --- a/tests/wchar_test.cpp +++ b/tests/wchar_test.cpp @@ -351,7 +351,7 @@ void test_mbsrtowcs(mbstate_t* ps) { // Check that we didn't clobber the rest of out. ASSERT_EQ(L'x', out[3]); // Check that valid has advanced to the end of the string. - ASSERT_EQ(L'\0', *valid); + ASSERT_EQ(nullptr, valid); const char* invalid = "A" "\xc2\x20" "ef"; ASSERT_EQ(static_cast<size_t>(-1), mbsrtowcs(out, &invalid, 4, ps)); |