From: David Levine Date: Sat, 29 Jul 2017 21:55:25 +0000 (-0400) Subject: Restored local variable to m_Eom(), to not truncate EOF. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/278ab4487e14f01d66c6c7c2979ee8a4c645c05d?hp=--cc Restored local variable to m_Eom(), to not truncate EOF. Reversion of significant part of commit d3e11c5e9. Thanks to Ralph for noticing that it wasn't a good change. --- 278ab4487e14f01d66c6c7c2979ee8a4c645c05d diff --git a/sbr/m_getfld.c b/sbr/m_getfld.c index 683db175..f7a7acb9 100644 --- a/sbr/m_getfld.c +++ b/sbr/m_getfld.c @@ -876,10 +876,13 @@ m_Eom (m_getfld_state_t s) char *cp; for (i = 0, cp = text; i < s->edelimlen; ++i, ++cp) { - if ((*cp = Getc (s)) == EOF) { + int c2; + + if ((c2 = Getc (s)) == EOF) { *cp = '\0'; break; } + *cp = c2; } if (i != s->edelimlen ||