Mercurial > code
changeset 294:434a6a289206
Merge
author | David Demelier <markand@malikania.fr> |
---|---|
date | Thu, 13 Nov 2014 21:04:28 +0100 |
parents | 9b3270513f40 (current diff) b500a445be97 (diff) |
children | 345aaeb5e0ba |
files | |
diffstat | 3 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/C++/Tests/Zip/data/data.txt Thu Nov 13 21:04:28 2014 +0100 @@ -0,0 +1,1 @@ +abcdef
--- a/C++/ZipArchive.cpp Thu Nov 13 21:03:12 2014 +0100 +++ b/C++/ZipArchive.cpp Thu Nov 13 21:04:28 2014 +0100 @@ -39,7 +39,7 @@ auto size = m_data.size(); auto data = static_cast<char *>(std::malloc(size)); - if (!data) + if (data == nullptr) throw std::runtime_error(std::strerror(errno)); std::memcpy(data, m_data.data(), size);