]> diplodocus.org Git - nmh/blobdiff - sbr/m_getfld.c
Move the termsbr code into the libmh library, where it belongs.
[nmh] / sbr / m_getfld.c
index f19f7f11c632bdcf60b45d6b88f7a82ece92aaa8..9884ba44980e5c4e87e73cc5f2b420114995ae56 100644 (file)
@@ -636,12 +636,15 @@ m_getfld (m_getfld_state_t *gstate, char name[NAMESZ], char *buf, int *bufsz,
                if (c != EOF) c = Peek (s);
                if (max < n) {
                    /* The dest buffer is full.  Need to back the read
-                       pointer up by one because when m_getfld() is
-                       reentered, it will read a character.  Then
-                       we'll jump right to the FLDPLUS handling code,
-                       which will not store that character, but
-                       instead move on to the next one. */
-                    if (s->readpos > s->msg_buf) --s->readpos;
+                      pointer up by one because when m_getfld() is
+                      reentered, it will read a character.  Then
+                      we'll jump right to the FLDPLUS handling code,
+                      which will not store that character, but
+                      instead move on to the next one. */
+                   if (s->readpos > s->msg_buf) {
+                       --s->readpos;
+                       --s->bytes_read;
+                   }
                    s->state = FLDPLUS;
                    finished = 1;
                } else if (c != ' '  &&  c != '\t') {