configure, configure.in stamp-h.in, and uip/Makefile.in modified to fix
[mmh] / sbr / m_getfld.c
index aca481a..4752893 100644 (file)
@@ -390,7 +390,7 @@ m_getfld (int state, unsigned char *name, unsigned char *buf,
                *cp++ = j = *(iob->_ptr + c);
                c = _filbuf(iob);
 #endif
-               if ((j == '\0' || j == '\n') && c != ' ' && c != '\t') {
+                if (c == EOF || (j == '\0' || j == '\n') && c != ' ' && c != '\t') {
                    if (c != EOF) {
 #ifdef LINUX_STDIO
                        --iob->_IO_read_ptr;