Re: g_io_channel_read_chars() loop



On Thu, Aug 09, 2001 at 06:47:07PM -0700, Ron Steinke wrote:
> Are you sure it's looping in g_utf8_next_char () due to the garbage?
> That's just a macro, so at the very least it should be returning to
> g_io_channel_read_chars () and looping there. Unless some of the
> skips are zero, it should always increment nextchar by something.
> Maybe the loop is somewhere else in the iochannel code?

	No, I didn't mean that it is looping in g_utf8_next_char() --
that simply expands to pointer arithmetic.  I just noticed that it skips
a '\0' character, which I thought weird.  I've chatted with Owen about
it, and it is the defined behavior.  In the end, it doesn't affect the
bounds of this problem.  The code is looping in the do{}while() loop
there because got_bytes > 0 but encoded_read_buf->str[0] == '\0' (which
should not happen at all).

Joel

-- 

"Nobody loves me,
 Nobody seems to care.
 Troubles and worries, people,
 You know I've had my share."

			http://www.jlbec.org/
			jlbec evilplan org




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]