bug in mbrtowc?

Pedro Izecksohn pedro.izecksohn@gmail.com
Tue Jul 28 10:49:00 GMT 2009


 To initialize wchar_t wc=(wchar_t)0; may also help.
On Tue, Jul 28, 2009 at 6:56 AM, Andy Koppe<andy.koppe@gmail.com> wrote:
> 2009年7月28日 Pedro Izecksohn:
>>  The bug is in O.P.'s code as &s is not being passed to mbrtowc.
>> From http://www.opengroup.org/onlinepubs/009695399/functions/mbrtowc.html:
> "If ps is a null pointer, the mbrtowc() function shall use its own
> internal mbstate_t object, which shall be initialized at program
> start-up to the initial conversion state."
>> The test also fails when passing &s instead. (I'd accidentally left in
> the local mb_state.)
>> Andy

--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple


More information about the Cygwin mailing list

AltStyle によって変換されたページ (->オリジナル) /