On 08/19/15 19:04, Iván Matellanes wrote:
> +/* ?pbackfail@streambuf@@UAEHH@Z */
> +/* ?pbackfail@streambuf@@UEAAHH@Z */
> +DEFINE_THISCALL_WRAPPER(streambuf_pbackfail, 8)
> +#define call_streambuf_pbackfail(this, c) CALL_VTBL_FUNC(this, 36, int, (streambuf*, int), (this, c))
> +int __thiscall streambuf_pbackfail(streambuf *this, int c)
> +{
> + TRACE("(%p %d)\n", this, c);
> + if (this->gptr > this->eback)
> + return *--this->gptr = c;
> + if (call_streambuf_seekoff(this, -1, SEEKDIR_cur, OPENMODE_in) == EOF)
> + return EOF;
> + return c;
> +}
If seekoff is used the buffers needs to be updated. Otherwise next read
will return incorrect data. You will need to make space for put back
character and place it in the buffer.
Thanks,
Piotr