diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1999-01-24 20:24:46 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1999-01-24 20:24:46 +0000 |
commit | c5b8504df113987096f06f2d94ee4c5ed44e88b9 (patch) | |
tree | 733d2ac5218b26f3afcb5530710634d04610e2db /ace/SString.cpp | |
parent | e505e1a49bb091053fb34b646cdba9617f8c7626 (diff) | |
download | ATCD-c5b8504df113987096f06f2d94ee4c5ed44e88b9.tar.gz |
.
Diffstat (limited to 'ace/SString.cpp')
-rw-r--r-- | ace/SString.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ace/SString.cpp b/ace/SString.cpp index 9c20e491792..021e721d097 100644 --- a/ace/SString.cpp +++ b/ace/SString.cpp @@ -340,9 +340,11 @@ ACE_CString::substring (size_t offset, // case 2. start pos l if (offset >= this->len_) return nil; - - // get all remaining bytes - if (length == -1) + // No length == empty string. + else if (lenth == 0) + return nil; + // Get all remaining bytes. + else if (length == -1) count = this->len_ - offset; return ACE_CString (&this->rep_[offset], |