From: fred Date: Mon, 21 Oct 1996 21:24:49 +0000 (+0000) Subject: flower-1.0.2 X-Git-Tag: release/1.5.59~7054 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=00884cb857e1552027791c9cdf9c19849b836b92;p=lilypond.git flower-1.0.2 --- 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