From e6fcf8e3c7db4549b9c2d60102fe529b6c678d25 Mon Sep 17 00:00:00 2001 From: David Levine Date: Wed, 26 Dec 2012 09:52:12 -0600 Subject: [PATCH] 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. --- sbr/m_getfld.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); -- 2.56.0