mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 14:02:52 +02:00
util/spkmodem-recv: allow short sample reads
fread() may return short reads, whereas the current code assumes either EOF or a full read. change if to a while. really, it's that simple. just loop until it's done. i probably b0rked this myself when refactoring the GNU code. Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -190,7 +190,7 @@ read_sample(struct decoder_state *st)
|
||||
{
|
||||
size_t n;
|
||||
|
||||
if (st->inpos >= st->inlen) {
|
||||
while (st->inpos >= st->inlen) {
|
||||
|
||||
n = fread(st->inbuf, sizeof(st->inbuf[0]),
|
||||
READ_BUF, stdin);
|
||||
|
||||
Reference in New Issue
Block a user