From: "eric pouech (@epo)" Subject: Re: [PATCH 0/1] MR352: cmd: Don't loop infinitely on NUL. Message-Id: Date: Thu, 30 Jun 2022 14:45:15 +0000 In-Reply-To: References: the changes to fgets don't look fully right you should return the characters in bufA until the NUL character (as done for \n) if there are some, and NULL in case there are none... (it works in your test case as the string 'a b c' is terminated by the new line) -- https://gitlab.winehq.org/wine/wine/-/merge_requests/352#note_3062