mirror of
https://github.com/boostorg/regex.git
synced 2025-07-17 14:22:08 +02:00
This commit is contained in:
@ -267,15 +267,16 @@ void mapfile::lock(pointer* node)const
|
|||||||
read_size = std::fread(*node + sizeof(int), _size % buf_size, 1, hfile);
|
read_size = std::fread(*node + sizeof(int), _size % buf_size, 1, hfile);
|
||||||
else
|
else
|
||||||
read_size = std::fread(*node + sizeof(int), buf_size, 1, hfile);
|
read_size = std::fread(*node + sizeof(int), buf_size, 1, hfile);
|
||||||
#ifndef BOOST_NO_EXCEPTIONS
|
|
||||||
if((read_size == 0) || (std::ferror(hfile)))
|
if((read_size == 0) || (std::ferror(hfile)))
|
||||||
{
|
{
|
||||||
|
#ifndef BOOST_NO_EXCEPTIONS
|
||||||
|
unlock(node);
|
||||||
throw std::runtime_error("Unable to read file.");
|
throw std::runtime_error("Unable to read file.");
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
BOOST_REGEX_NOEH_ASSERT((0 == std::ferror(hfile)) && (read_size != 0));
|
BOOST_REGEX_NOEH_ASSERT((0 == std::ferror(hfile)) && (read_size != 0));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(*reinterpret_cast<int*>(*node) == 0)
|
if(*reinterpret_cast<int*>(*node) == 0)
|
||||||
|
Reference in New Issue
Block a user