You've already forked linuxdeploy
mirror of
https://github.com/encounter/linuxdeploy.git
synced 2026-03-30 11:18:58 -07:00
Don't use exceptions to detect abnormal behavior
https://isocpp.org/wiki/faq/exceptions#why-not-exceptions
This commit is contained in:
@@ -34,8 +34,7 @@ namespace linuxdeploy {
|
||||
if (size == 0)
|
||||
continue;
|
||||
|
||||
if (size > buf.size())
|
||||
throw std::runtime_error("Read more bytes than buffer size");
|
||||
assert(size <= buf.size());
|
||||
|
||||
auto outBufSize = outBuf.size();
|
||||
outBuf.reserve(outBufSize + size + 1);
|
||||
|
||||
Reference in New Issue
Block a user