]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/general-scheme.cc
Issue 4895 Give SystemStartSquare a default of 5.0 for collapse-height
[lilypond.git] / lily / general-scheme.cc
index de5a2cc225be4f3f8ca2dd068ed471b0c0e116dd..02cf2fa76bf3c660a473b70da7ae543b574297af 100644 (file)
@@ -40,9 +40,6 @@ using namespace std;
 #include "version.hh"
 #include "warn.hh"
 
-using std::string;
-using std::vector;
-
 /* Declaration of log function(s) */
 SCM ly_progress (SCM, SCM);
 
@@ -598,7 +595,9 @@ LY_DEFINE (ly_format, "ly:format",
   char *ptr = result;
   for (vsize i = 0; i < results.size (); i++)
     {
-      strncpy (ptr, results[i].c_str (), results[i].size ());
+      // strcpy and strncpy cannot be used here
+      // because std::string may contain '\0' in its contents.
+      results[i].copy (ptr, results[i].size ());
       ptr += results[i].size ();
     }
   *ptr = '\0';