diff options
author | Liam <[email protected]> | 2024-02-22 20:20:31 -0500 |
---|---|---|
committer | Liam <[email protected]> | 2024-02-22 20:20:31 -0500 |
commit | 2c00599a539765469c41401adbd038e75228bc3b (patch) | |
tree | 5d760bacd649da75ec03a05dfa088710272a3996 | |
parent | c04567fad4825d08a169efb2f6b118fafe988a31 (diff) | |
download | yuzu-android-2c00599a539765469c41401adbd038e75228bc3b.tar.gz yuzu-android-2c00599a539765469c41401adbd038e75228bc3b.zip |
audio: fix released buffer bounds check
-rw-r--r-- | src/audio_core/device/audio_buffers.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/audio_core/device/audio_buffers.h b/src/audio_core/device/audio_buffers.h index 25da4c8a2..9e84a9c05 100644 --- a/src/audio_core/device/audio_buffers.h +++ b/src/audio_core/device/audio_buffers.h @@ -146,11 +146,15 @@ public: break; } + if (released < tags.size()) { + tags[released] = tag; + } + + released++; + if (released >= tags.size()) { break; } - - tags[released++] = tag; } return released; |