[PATCH 0/1] MR277: cmd: Handle lines with just spaces in bracket blocks.

eric pouech (@epo) wine at gitlab.winehq.org
Mon Jun 20 02:36:40 CDT 2022


On Mon Jun 20 07:36:40 2022 +0000, Bernhard Ãœbelacker wrote:
> Hello Eric, thanks for looking at it and sorry, I was not aware that
> there was already a patch submitted for this issue.
> Could you please give some more details about this EOF handling? When
> WCMD_fgets returns NULL for EOF the loop is left by the break in line [2309](https://gitlab.winehq.org/wine/wine/-/blob/master/programs/cmd/wcmdmain.c#L2309)?
> About the consecutive lines, those testbot runs
> [117281](https://testbot.winehq.org/JobDetails.pl?Key=117281)
> [117271](https://testbot.winehq.org/JobDetails.pl?Key=117271) have them,
> so I currently do not see an issue there, with both of our attempts to
> solve it?
Hello Bernhard,

When WCMD_fgets() hits EOF, the break line 2309 exists from 'do' loop starting at 2305, but continues at line 2323 by using extraSpace (which should have been read through extraData line 2308, thus in case of EOF, will reuse previously successful line read from WCMD_fgets...). IMO the EOF info should we propagated somehow (perhaps by setting an empty string in output buffer before the break)

For the consecutive lines, I was suggesting extending the test with several lines made of blank data (instead of a single one), to extend the coverage of the tests
. Your first patch already handles it (as testbot shows). Sorry if I haven't been clear.

-- 
https://gitlab.winehq.org/wine/wine/-/merge_requests/277#note_2334



More information about the wine-devel mailing list