Mercurial > code
changeset 287:c6a6bf42232b
Zip: cosmetic
author | David Demelier <markand@malikania.fr> |
---|---|
date | Wed, 12 Nov 2014 12:46:16 +0100 |
parents | 2ff6559c5f1d |
children | b500a445be97 |
files | C++/ZipArchive.cpp C++/ZipArchive.h |
diffstat | 2 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/C++/ZipArchive.cpp Tue Nov 11 15:05:18 2014 +0100 +++ b/C++/ZipArchive.cpp Wed Nov 12 12:46:16 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);