This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [Patch] Fix libstdc++/9533
Nathan Myers wrote:
One more thing: for a stateful encoding, the most you can return
is 0 unless you have converted characters already in the buffer.
The pending sequence might be just shift and unshift prefixes with
no actual character. (The return value is the sum of whatever is
already in the buffer and what you get using recv/fstat. You only
return -1 if the buffer is empty *and* you're sure there's nothing
else to come.)
Thanks for the addtional clarifications: for sure I would have done
something wrong otherwise.
Paolo.