aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLiam <[email protected]>2024-02-22 20:20:31 -0500
committerLiam <[email protected]>2024-02-22 20:20:31 -0500
commit2c00599a539765469c41401adbd038e75228bc3b (patch)
tree5d760bacd649da75ec03a05dfa088710272a3996
parentc04567fad4825d08a169efb2f6b118fafe988a31 (diff)
downloadyuzu-android-2c00599a539765469c41401adbd038e75228bc3b.tar.gz
yuzu-android-2c00599a539765469c41401adbd038e75228bc3b.zip
audio: fix released buffer bounds check
-rw-r--r--src/audio_core/device/audio_buffers.h8
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;