aboutsummaryrefslogtreecommitdiff
path: root/libxsde/xsde
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-10-15 12:26:14 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-10-15 12:26:14 +0200
commit0e4637025fa8d1b4234b0512561d31f0dd023843 (patch)
treef8d797b45da9b9826853fa1fcee4f9cd3c0e44e2 /libxsde/xsde
parentfac1bf0b0db4aa90472a2dd06c646af145e059a5 (diff)
Allow initialization with NULL C-string
Diffstat (limited to 'libxsde/xsde')
-rw-r--r--libxsde/xsde/cxx/ro-string.ixx6
1 files changed, 3 insertions, 3 deletions
diff --git a/libxsde/xsde/cxx/ro-string.ixx b/libxsde/xsde/cxx/ro-string.ixx
index 35a7e3d..cf37c81 100644
--- a/libxsde/xsde/cxx/ro-string.ixx
+++ b/libxsde/xsde/cxx/ro-string.ixx
@@ -17,7 +17,7 @@ namespace xsde
inline ro_string::
ro_string (const char* s)
- : data_ (s), size_ (strlen (s))
+ : data_ (s), size_ (s ? strlen (s) : 0)
{
}
@@ -81,7 +81,7 @@ namespace xsde
assign (const char* s)
{
data_ = s;
- size_ = strlen (s);
+ size_ = s ? strlen (s) : 0;
}
inline void ro_string::
@@ -123,7 +123,7 @@ namespace xsde
inline int ro_string::
compare (const char* str) const
{
- return compare (str, strlen (str));
+ return compare (str, str ? strlen (str) : 0);
}
inline int ro_string::