X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/cff8de7654cf393a494b01a587bd4d503d15a5e3..683e0fb1a14da5b9ce7bc5db6e76951d14d79348:/uip/msh.c diff --git a/uip/msh.c b/uip/msh.c index b3aa3a10..36286e0b 100644 --- a/uip/msh.c +++ b/uip/msh.c @@ -1005,15 +1005,17 @@ readid (int msgnum) return Msgs[msgnum].m_bboard_id; zp = msh_ready (msgnum, 0); - for (state = FLD;;) - switch (state = m_getfld (state, name, buf, sizeof(buf), zp)) { + for (state = FLD;;) { + int bufsz = sizeof buf; + switch (state = m_getfld (state, name, buf, &bufsz, zp)) { case FLD: case FLDEOF: case FLDPLUS: if (!mh_strcasecmp (name, BBoard_ID)) { bp = getcpy (buf); while (state == FLDPLUS) { - state = m_getfld (state, name, buf, sizeof(buf), zp); + bufsz = sizeof buf; + state = m_getfld (state, name, buf, &bufsz, zp); bp = add (buf, bp); } i = atoi (bp); @@ -1024,13 +1026,15 @@ readid (int msgnum) continue; } while (state == FLDPLUS) - state = m_getfld (state, name, buf, sizeof(buf), zp); + bufsz = sizeof buf; + state = m_getfld (state, name, buf, &bufsz, zp); if (state != FLDEOF) continue; default: return 0; } + } }