Fix audio::recorder's storage not being big enough in some cases causing invalid writes
This commit is contained in:
parent
2e2df09790
commit
ec18266d9e
1 changed files with 1 additions and 1 deletions
|
|
@ -26,7 +26,7 @@ namespace psemek::audio
|
|||
|
||||
if (storage_.size() < samples_.size() + sample_count)
|
||||
{
|
||||
storage_.resize(std::max<std::size_t>(sample_count, storage_.size() * 2));
|
||||
storage_.resize(std::max<std::size_t>(samples_.size() + sample_count, storage_.size() * 2));
|
||||
samples_ = {storage_.data(), storage_.data() + samples_.size()};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue