From: David Levine Date: Wed, 26 Dec 2012 15:52:12 +0000 (-0600) Subject: Restored an explicit refill of the buffer in m_getfld() that I X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/e6fcf8e3c7db4549b9c2d60102fe529b6c678d25?hp=4548a3ecc4248a1d4bd4fdd45d9a2bb1e61d1e70 Restored an explicit refill of the buffer in m_getfld() that I removed in the big stdio cleanup. Its need is shown by reducing the message buffer size to 2048. --- diff --git a/sbr/m_getfld.c b/sbr/m_getfld.c index b02acd58..27e3d3bc 100644 --- a/sbr/m_getfld.c +++ b/sbr/m_getfld.c @@ -359,8 +359,8 @@ m_getfld (int state, unsigned char name[NAMESZ], unsigned char *buf, j = bp - sp; if ((cnt -= j) <= 0) { - /* Used to explicitly force refill of the buffer - here, but Getc() will do that if necessary. */ + /* Next to force refill of the buffer here. */ + m.readpos = m.end; if (Getc (iob) == EOF) { *cp = *buf = 0; advise (NULL, "eof encountered in field \"%s\"", name);