[PATCH] msvcrt: Fix fscanf return when EOF is immediately after an end of line.
Erich E. Hoover
erich.e.hoover at gmail.com
Fri Oct 18 10:40:06 CDT 2019
Hi Piotr,
I just ran the widecharstring case on the testbot (
https://testbot.winehq.org/JobDetails.pl?Key=57989 ) and that seems to
return 0 instead of WEOF... Are you alright with just adding this
test to demonstrate that it doesn't work the same way? Failing test:
===
buffer[0] = ' ';
buffer[1] = '\t';
buffer[2] = '\n';
buffer[3] = '\n';
buffer[4] = 0;
ret = swscanf(buffer, formats, results);
ok( ret == (short)WEOF, "ret = %d\n", ret );
===
Best,
Erich
On Fri, Oct 18, 2019 at 3:49 AM Piotr Caban <piotr.caban at gmail.com> wrote:
>
> Hi Erich,
>
> On 10/17/19 5:41 PM, Erich E. Hoover wrote:
> > + /* if we have reached the EOF and output nothing then report EOF */
> > + if (nch==_EOF_ && rd==0 && st==0) {
> _UNLOCK_FILE_(file);
> > + return _EOF_RET;
> > + }
>
> Please also update the widecharstring case.
>
> > + fp = fopen(file_name, "wb");
> > + ok(fp, "fp = %p\n", fp);
> This cause compilation warning.
>
> Thanks,
> Piotr
More information about the wine-devel
mailing list