From: <jo...@us...> - 2012-09-22 07:24:07
|
Revision: 38891 http://crystal.svn.sourceforge.net/crystal/?rev=38891&view=rev Author: jorrit Date: 2012-09-22 07:24:01 +0000 (Sat, 22 Sep 2012) Log Message: ----------- Made string comparison a bit safer by testing for str == 0. Modified Paths: -------------- CS/trunk/include/csutil/csstring.h Modified: CS/trunk/include/csutil/csstring.h =================================================================== --- CS/trunk/include/csutil/csstring.h 2012-09-16 12:56:54 UTC (rev 38890) +++ CS/trunk/include/csutil/csstring.h 2012-09-22 07:24:01 UTC (rev 38891) @@ -625,7 +625,7 @@ * \remarks The comparison is case-sensitive. */ bool Compare (const char* iStr) const - { return (strcmp (GetDataSafe(), iStr) == 0); } + { return (strcmp (GetDataSafe(), iStr ? iStr : "") == 0); } /** * Check if another string is equal to this one. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |