ps: work around libc bug: printf("%.*s\n", MAX_INT, buffer)

This commit is contained in:
Denis Vlasenko
2007-03-28 21:57:12 +00:00
parent b7cffd4bed
commit 450196c119
2 changed files with 6 additions and 4 deletions

View File

@ -253,9 +253,9 @@ void smart_ulltoa5(unsigned long long ul, char buf[5])
buf[4] = '\0';
}
// Convert unsigned integer to ascii, writing into supplied buffer. A
// truncated result is always null terminated (unless buflen is 0), and
// contains the first few digits of the result ala strncpy.
// Convert unsigned integer to ascii, writing into supplied buffer.
// A truncated result contains the first few digits of the result ala strncpy.
// Returns a pointer past last generated digit, does _not_ store NUL.
void BUG_sizeof_unsigned_not_4(void);
char *utoa_to_buf(unsigned n, char *buf, unsigned buflen)
{