fixed crash causd by passing CString objects to log
authorPat McIlroy <itgpmc@gmail.com>
Mon, 28 Feb 2011 06:38:30 +0000 (22:38 -0800)
committerCarl Myers <cmyers@cmyers.org>
Mon, 28 Feb 2011 06:54:38 +0000 (22:54 -0800)
src/StdString.h
src/StepMania.cpp

index 624f290..298abcb 100755 (executable)
@@ -643,7 +643,7 @@ public:
        {\r
                // Range check the count.\r
 \r
-               nCount = max(0, min(nCount, static_cast<int>(this->size())));\r
+               nCount = std::max(0, std::min(nCount, static_cast<int>(this->size())));\r
                return this->substr(0, static_cast<MYSIZE>(nCount)); \r
        }\r
 \r
@@ -686,7 +686,7 @@ public:
        {\r
                // Range check the count.\r
 \r
-               nCount = max(0, min(nCount, static_cast<int>(this->size())));\r
+               nCount = std::max(0, std::min(nCount, static_cast<int>(this->size())));\r
                return this->substr(this->size()-static_cast<MYSIZE>(nCount));\r
        }\r
 \r
index 9c432f0..cc862f3 100755 (executable)
@@ -898,7 +898,7 @@ static void MountTreeOfZips( const CString &dir, bool recurse = true )
 static void WriteLogHeader()
 {
        LOG->Info( ProductInfo::getFullVersionString());
-       LOG->Info( "Compiled %s (build %lu)", ProductInfo::getDate(), ProductInfo::getVersion() );
+       LOG->Info( "Compiled %s (build %s)", ProductInfo::getDate().c_str(), ProductInfo::getVersion().c_str() );
 
        time_t cur_time;
        time(&cur_time);