This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: bug in mbrtowc?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]