bitmask_snprintf: avoid returning too soon if we're using the

new-style format.
This commit is contained in:
sommerfeld 1999-12-13 01:29:03 +00:00
parent 93331a6d49
commit 8933230897
1 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: subr_prf.c,v 1.64 1999/08/27 01:14:15 thorpej Exp $ */
/* $NetBSD: subr_prf.c,v 1.65 1999/12/13 01:29:03 sommerfeld Exp $ */
/*-
* Copyright (c) 1986, 1988, 1991, 1993
@ -758,10 +758,10 @@ bitmask_snprintf(val, p, buf, buflen)
}
/*
* If the value we printed was 0, or if we don't have room for
* "<x>", we're done.
* If the value we printed was 0 and we're using the old-style format,
* or if we don't have room for "<x>", we're done.
*/
if (val == 0 || left < 3)
if (((val == 0) && (ch != '\177')) || left < 3)
return (buf);
#define PUTBYTE(b, c, l) \