[libcxx] r233012 - Fix incorrect error handling of call to mbrtowc. This is PR#13759. Leaving the bug open because (1) I'm not sure that we're correct here, only better than before, and (2) no tests
Marshall Clow
mclow.lists at gmail.com
Mon Mar 23 13:07:17 PDT 2015
Author: marshall
Date: Mon Mar 23 15:07:17 2015
New Revision: 233012
URL: http://llvm.org/viewvc/llvm-project?rev=233012&view=rev
Log:
Fix incorrect error handling of call to mbrtowc. This is PR#13759. Leaving the bug open because (1) I'm not sure that we're correct here, only better than before, and (2) no tests
Modified:
libcxx/trunk/src/locale.cpp
Modified: libcxx/trunk/src/locale.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/locale.cpp?rev=233012&r1=233011&r2=233012&view=diff
==============================================================================
--- libcxx/trunk/src/locale.cpp (original)
+++ libcxx/trunk/src/locale.cpp Mon Mar 23 15:07:17 2015
@@ -1657,7 +1657,7 @@ codecvt<wchar_t, char, mbstate_t>::do_in
frm_nxt = frm;
return frm_nxt == frm_end ? ok : partial;
}
- if (n == 0)
+ if (n == (size_t)-1)
return error;
to_nxt += n;
if (to_nxt == to_end)
More information about the cfe-commits
mailing list