From 00884cb857e1552027791c9cdf9c19849b836b92 Mon Sep 17 00:00:00 2001 From: fred Date: Mon, 21 Oct 1996 21:24:49 +0000 Subject: [PATCH] flower-1.0.2 --- flower/string.cc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/flower/string.cc b/flower/string.cc index da4941da7b..2e8e8bf5c6 100644 --- a/flower/string.cc +++ b/flower/string.cc @@ -15,7 +15,7 @@ //#include "globals.hh" #include "string.hh" -char* strlwr( char* s ) +static char* strlwr( char* s ) { char* p = s; @@ -27,7 +27,7 @@ char* strlwr( char* s ) return s; } -char* strupr( char* s ) +static char* strupr( char* s ) { char* p = s; @@ -320,7 +320,13 @@ String String::lower() String::String (double f, const char *fmt) { - char buf[100]; // ugly + /* worst case would be printing HUGE (or 1/HUGE), which is approx + 2e318, this number would have approx 318 zero's in its string. + + 1024 is a safe length for the buffer + */ + + char buf[1024]; if (!fmt) sprintf(buf, "%f", f); else -- 2.39.5