mirror of
https://github.com/audacity/linuxdeploy.git
synced 2026-02-04 20:36:11 -06:00
Don't use exceptions to detect abnormal behavior
https://isocpp.org/wiki/faq/exceptions#why-not-exceptions
This commit is contained in:
parent
2e1a37ccf5
commit
beb2ee15be
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user