summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/kwsys/RegularExpression.hxx.in9
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/kwsys/RegularExpression.hxx.in b/Source/kwsys/RegularExpression.hxx.in
index 5b6b451..5780c21 100644
--- a/Source/kwsys/RegularExpression.hxx.in
+++ b/Source/kwsys/RegularExpression.hxx.in
@@ -379,7 +379,14 @@ inline kwsys_stl::string::size_type RegularExpression::end(int n) const
*/
inline kwsys_stl::string RegularExpression::match(int n) const
{
- return kwsys_stl::string(this->startp[n], this->endp[n] - this->startp[n]);
+ if (this->startp[n]==0)
+ {
+ return kwsys_stl::string("");
+ }
+ else
+ {
+ return kwsys_stl::string(this->startp[n], this->endp[n] - this->startp[n]);
+ }
}
} // namespace @KWSYS_NAMESPACE@