diff --git a/src/fstring.cpp b/src/fstring.cpp index f1be5508..3e953f91 100644 --- a/src/fstring.cpp +++ b/src/fstring.cpp @@ -1700,6 +1700,9 @@ bool FString::operator >= (const char c) const //---------------------------------------------------------------------- bool FString::operator > (const FString& s) const { + if ( ! (string || s.string) ) + return false; + if ( ! s ) return true; @@ -1709,9 +1712,6 @@ bool FString::operator > (const FString& s) const if ( ! string && s.string ) return false; - if ( ! (string || s.string) ) - return false; - return ( std::wcscmp(string, s.string) > 0 ); } diff --git a/src/test/fstring-test.cpp b/src/test/fstring-test.cpp index ae2deaae..705560f1 100644 --- a/src/test/fstring-test.cpp +++ b/src/test/fstring-test.cpp @@ -141,7 +141,7 @@ void FStringTest::NoArgumentTest() CPPUNIT_ASSERT ( ! empty.includes(std::wstring(L"123")) ); CPPUNIT_ASSERT ( ! empty.includes(FString("123")) ); - std::stringstream out; + std::ostringstream out; out << empty; CPPUNIT_ASSERT ( out.str() == "" );