harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apetre...@apache.org
Subject svn commit: r548644 - /harmony/enhanced/classlib/trunk/modules/awt/src/main/native/fontlib/shared/TypeDefinition.cpp
Date Tue, 19 Jun 2007 08:06:42 GMT
Author: apetrenko
Date: Tue Jun 19 01:06:41 2007
New Revision: 548644

URL: http://svn.apache.org/viewvc?view=rev&rev=548644
Log:
Fontlib crash on em64t fix

Modified:
    harmony/enhanced/classlib/trunk/modules/awt/src/main/native/fontlib/shared/TypeDefinition.cpp

Modified: harmony/enhanced/classlib/trunk/modules/awt/src/main/native/fontlib/shared/TypeDefinition.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/fontlib/shared/TypeDefinition.cpp?view=diff&rev=548644&r1=548643&r2=548644
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/src/main/native/fontlib/shared/TypeDefinition.cpp
(original)
+++ harmony/enhanced/classlib/trunk/modules/awt/src/main/native/fontlib/shared/TypeDefinition.cpp
Tue Jun 19 01:06:41 2007
@@ -2,6 +2,9 @@
 
 fint fwcslen(fwchar_t* str)
 {
+    if (!str)
+        return 0;
+        
 	fint counter=0;
 	fwchar_t* tmpstr = str;
 	while(*tmpstr != 0)
@@ -14,6 +17,9 @@
 
 fint fwcscmp(fwchar_t* str1, fwchar_t* str2)
 {
+    if (str1 == 0 || str2 == 0)
+        return str1 - str2;
+        
 	fwchar_t* tmpstr1 = str1; 
 	fwchar_t* tmpstr2 = str2;
 	while(*tmpstr1 != 0 || *tmpstr2 !=0)



Mime
View raw message