]> git.donarmstrong.com Git - lilypond.git/commitdiff
flower-1.0.2
authorfred <fred>
Mon, 21 Oct 1996 21:24:49 +0000 (21:24 +0000)
committerfred <fred>
Mon, 21 Oct 1996 21:24:49 +0000 (21:24 +0000)
flower/string.cc

index da4941da7b0dd5993e870707da41e1861e9dafde..2e8e8bf5c6f33e5f7849fefaf4a1a70c2faee518 100644 (file)
@@ -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