fix integer overflow (-fsanitize=integer)
This commit is contained in:
parent
c7693d9765
commit
9704e3eec5
1 changed files with 1 additions and 1 deletions
|
@ -125,7 +125,7 @@ struct svg_renderer : renderer_base<std::string>
|
|||
}
|
||||
std::string expected(std::istreambuf_iterator<char>(stream.rdbuf()),(std::istreambuf_iterator<char>()));
|
||||
stream.close();
|
||||
return std::fabs(actual.size() - expected.size());
|
||||
return std::max(actual.size(), expected.size()) - std::min(actual.size(), expected.size());
|
||||
}
|
||||
|
||||
void save(image_type const & image, boost::filesystem::path const& path) const
|
||||
|
|
Loading…
Reference in a new issue