mirror of
https://github.com/boostorg/regex.git
synced 2025-07-17 14:22:08 +02:00
Tentative fix for case where a transformation of a NULL string is requested.
This commit is contained in:
@ -508,6 +508,10 @@ typename cpp_regex_traits_implementation<charT>::string_type
|
|||||||
// we adhere to gcc's (buggy) preconditions...
|
// we adhere to gcc's (buggy) preconditions...
|
||||||
//
|
//
|
||||||
BOOST_ASSERT(*p2 == 0);
|
BOOST_ASSERT(*p2 == 0);
|
||||||
|
if(p1 == p2)
|
||||||
|
{
|
||||||
|
return string_type(p1, p2);
|
||||||
|
}
|
||||||
|
|
||||||
string_type result;
|
string_type result;
|
||||||
//
|
//
|
||||||
@ -584,6 +588,11 @@ typename cpp_regex_traits_implementation<charT>::string_type
|
|||||||
// std::bad_alloc for certain arguments...
|
// std::bad_alloc for certain arguments...
|
||||||
//
|
//
|
||||||
string_type result, result2;
|
string_type result, result2;
|
||||||
|
if(p1 == p2)
|
||||||
|
{
|
||||||
|
result.assign(p1, p2);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
#ifndef BOOST_NO_EXCEPTIONS
|
#ifndef BOOST_NO_EXCEPTIONS
|
||||||
try{
|
try{
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user