UsbMic: Fix copy on resize shrink.

This commit is contained in:
Unknown W. Brackets committed 2022-12-30 21:31:33 -08:00
1 parent 1a85370c0a
commit ff3e70be2f
1 file changed
+1 -1
+1 -1
View File
@@ -232,7 +232,7 @@ void QueueBuf::resize(u32 newSize) {
u8 *oldbuf = buf_;
buf_ = new u8[newSize];
pop(buf_, availableSize);
pop(buf_, std::min(availableSize, newSize));
available = availableSize;
end = availableSize;
capacity = newSize;