Browse Source

cmText.c cmTextIsEmpty() now returns true when input == NULL.

master
kevin 12 years ago
parent
commit
a40294f9a9
1 changed files with 4 additions and 3 deletions
  1. 4
    3
      cmText.c

+ 4
- 3
cmText.c View File

603
 
603
 
604
 bool cmTextIsEmpty( const cmChar_t* s )
604
 bool cmTextIsEmpty( const cmChar_t* s )
605
 {
605
 {
606
-  for(; *s; ++s )
607
-    if( !isspace(*s) )
608
-      return false;
606
+  if( s!=NULL )
607
+    for(; *s; ++s )
608
+      if( !isspace(*s) )
609
+        return false;
609
   return true;
610
   return true;
610
 }
611
 }
611
 
612
 

Loading…
Cancel
Save