commit | 1b836ee6f8e5c0f61d67c1f014819a066366ab6f | [log] [tgz] |
---|---|---|
author | Elliott Hughes <enh@google.com> | Fri Apr 18 13:32:33 2014 -0700 |
committer | Elliott Hughes <enh@google.com> | Fri Apr 18 13:32:33 2014 -0700 |
tree | 95b0a2f8862ab866a65b78d7da9fe411011b79c8 | |
parent | b88da06580a22d9a1ee5a1c573c49e89207bc71b [diff] [blame] |
Fix a wchar.wcstombs_wcrtombs test failure. Looks like I screwed up a last-minute refactor and didn't re-run the tests. Change-Id: I90a710ae66a313a9812859650aa0b4e8c6bc57f9
diff --git a/libc/bionic/wchar.cpp b/libc/bionic/wchar.cpp index a507808..021d14b 100644 --- a/libc/bionic/wchar.cpp +++ b/libc/bionic/wchar.cpp
@@ -250,6 +250,9 @@ // TODO: UTF-8 support. if ((*src)[i] > 0x7f) { errno = EILSEQ; + if (dst != NULL) { + *src = &(*src)[i]; + } return static_cast<size_t>(-1); } if (dst != NULL) {