From 048b0da0188d1b1fe8f5487c08e5ee6f2b3160da Mon Sep 17 00:00:00 2001 From: Martin Pool Date: Mon, 14 Apr 2003 04:55:49 +0000 Subject: Doc. Add additional test case for a bug recently found in rsync by Paul Green. Appparently it was fixed here a while ago. (This used to be commit a0033cc83c837bc075dd689fdf7a69a6aa4ecd18) --- source3/lib/snprintf.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'source3/lib') diff --git a/source3/lib/snprintf.c b/source3/lib/snprintf.c index 1eae2f09b9..81e4866cc5 100644 --- a/source3/lib/snprintf.c +++ b/source3/lib/snprintf.c @@ -1,3 +1,7 @@ +/* + * NOTE: If you change this file, please merge it into rsync, samba, etc. + */ + /* * Copyright Patrick Powell 1995 * This code is based on code written by Patrick Powell (papowell@astart.com) @@ -61,6 +65,9 @@ #define NULL 0 #endif +/* TODO: Perhaps always include config.h, but strip out the macros for + * snprintf() etc when in test mode? */ + #ifdef TEST_SNPRINTF /* need math library headers for testing */ #include #endif @@ -866,8 +873,9 @@ static void dopr_outch(char *buffer, size_t *currlen, size_t maxlen, char c) "-16.16f", NULL }; + /* XXX: What does "0203.9" even mean? An octal floating point number??? */ double fp_nums[] = { 6442452944.1234, -1.5, 134.21, 91340.2, 341.1234, 0203.9, 0.96, 0.996, - 0.9996, 1.996, 4.136, 5.030201, 0}; + 0.9996, 1.996, 4.136, 5.030201, 0, 0.00205}; char *int_fmt[] = { "%-1.5d", "%1.5d", -- cgit