X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/135c745ee4ad748caf3759fe946185a6f3997572..bf4e14adcab829c23f134253dea686789eb21d6a:/sbr/m_getfld.c diff --git a/sbr/m_getfld.c b/sbr/m_getfld.c index 8d784889..0f068031 100644 --- a/sbr/m_getfld.c +++ b/sbr/m_getfld.c @@ -664,7 +664,7 @@ m_getfld (m_getfld_state_t *gstate, char name[NAMESZ], char *buf, int *bufsz, max = *bufsz-1; /* Back up and store the current position. */ bp = --s->readpos; - c = s->end - s->readpos < max ? s->end - s->readpos : max; + c = min(s->end - s->readpos, max); if (s->msg_style != MS_DEFAULT && c > 1) { /* * packed maildrop - only take up to the (possible)