From b0630dd5ed56e5a1713411083aee580cee9b6244 Mon Sep 17 00:00:00 2001 From: lottaviano Date: Fri, 18 Sep 2009 09:18:06 +0000 Subject: [PATCH] Update default buffer size for formatwr. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2964 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/cfg/cfg_formatwr.h | 2 +- bertos/mware/formatwr.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bertos/cfg/cfg_formatwr.h b/bertos/cfg/cfg_formatwr.h index ba08654c..0325a100 100644 --- a/bertos/cfg/cfg_formatwr.h +++ b/bertos/cfg/cfg_formatwr.h @@ -61,7 +61,7 @@ * $WIZ$ type = "int" * $WIZ$ min = 4 */ -#define CONFIG_FRMWRI_BUFSIZE 20 +#define CONFIG_FRMWRI_BUFSIZE 100 #endif /* CFG_FORMATWR_H */ diff --git a/bertos/mware/formatwr.c b/bertos/mware/formatwr.c index afc4976e..5b2323d8 100644 --- a/bertos/mware/formatwr.c +++ b/bertos/mware/formatwr.c @@ -112,8 +112,9 @@ #else /* Conservative estimate. Max float is 3.40282e+038, so %f (but not %e or %g) must have * space for: sign + all 38 digits + '.' + 6 decimal digits (default) + * Use a high value to avoid unexpected buffer overflows. */ - #define FRMWRI_BUFSIZE 50 + #define FRMWRI_BUFSIZE 100 #endif #else #if CONFIG_FRMWRI_BUFSIZE -- 2.25.1