On Mon Jun 20 07:55:20 2022 +0000, eric pouech wrote:
Hello Bernhard, When WCMD_fgets() hits EOF, the break line 2309 exits 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.
Thanks for the clarification. I hope what the second patch does is really the issue you describe. But instead of trying to handle it inside the loop it tries to detect the unbalanced brackets afterwards, and removes the collected commands and sets errorlevel.