Browse Source

#630, ofstream doesn't have constructor from std::string on older compilers.

Michał W. Urbańczyk 15 years ago
parent
commit
4434a73651
1 changed files with 2 additions and 1 deletions
  1. 2 1
      client/Graphics.cpp

+ 2 - 1
client/Graphics.cpp

@@ -701,7 +701,8 @@ Font * Graphics::loadFont( const char * name )
 	if(len < 10000  || magic != 589598 && magic != 589599)
 	if(len < 10000  || magic != 589598 && magic != 589599)
 	{
 	{
 		tlog1 << "Suspicious font file (length " << len <<", fname " << name << "), logging to suspicious_" << name << ".fnt\n";
 		tlog1 << "Suspicious font file (length " << len <<", fname " << name << "), logging to suspicious_" << name << ".fnt\n";
-		std::ofstream o("suspicious_" + std::string(name) + ".fnt");
+		std::string suspFName = "suspicious_" + std::string(name) + ".fnt";
+		std::ofstream o(suspFName.c_str());
 		o.write((const char*)hlp, len);
 		o.write((const char*)hlp, len);
 	}
 	}