don't assert on valid return values from strcmp (fix crash in Linux)

This commit is contained in:
Chris Danford
2005-04-23 11:06:28 +00:00
parent aa8b96ab87
commit c2c3e00e31
+7 -7
View File
@@ -101,13 +101,13 @@ struct NoteSkinAndPath
CString sPath; CString sPath;
bool operator<( const NoteSkinAndPath &other ) const bool operator<( const NoteSkinAndPath &other ) const
{ {
switch( strcmp(sNoteSkin, other.sNoteSkin) ) int cmp = strcmp(sNoteSkin, other.sNoteSkin);
{ if( cmp < 0 )
case -1: return true; return true;
case 0: return sPath < other.sPath; else if( cmp == 0 )
case 1: return false; return sPath < other.sPath;
default: ASSERT(0); return false; else
} return false;
} }
}; };