audio: fix released buffer bounds check

merge-requests/60/head
Liam 2024-02-22 20:20:31 +07:00
parent c04567fad4
commit 2c00599a53
1 changed files with 6 additions and 2 deletions

@ -146,11 +146,15 @@ public:
break;
}
if (released < tags.size()) {
tags[released] = tag;
}
released++;
if (released >= tags.size()) {
break;
}
tags[released++] = tag;
}
return released;