From: David Levine Date: Thu, 27 Dec 2012 19:53:33 +0000 (-0600) Subject: Corrected fseek() emulation to fix test/bad-input/test-header. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/6195e9e4898927e2739af4cb168aa198ddde39ef?hp=-c Corrected fseek() emulation to fix test/bad-input/test-header. --- 6195e9e4898927e2739af4cb168aa198ddde39ef diff --git a/sbr/m_getfld.c b/sbr/m_getfld.c index c8a2d8b8..577030c1 100644 --- a/sbr/m_getfld.c +++ b/sbr/m_getfld.c @@ -409,7 +409,7 @@ m_getfld (int state, unsigned char name[NAMESZ], unsigned char *buf, * get extra newlines, but that should be harmless enough, * right? This is a corrupt message anyway. */ /* emulates: fseek (iob, ftell (iob) -2), SEEK_SET) */ - m.readpos += cnt - 1; + m.readpos -= 2; *bufsz = bytes_read; return BODY; }