Vorbis: Remove redundant bounds check

This commit is contained in:
Lalit Shankar Chowdhury 2024-09-27 21:04:46 +05:30
parent 76a135926a
commit 2caaa2cae5
No known key found for this signature in database
GPG Key ID: 86C194734C5D950E
1 changed files with 0 additions and 1 deletions

View File

@ -155,7 +155,6 @@ Ref<AudioStreamOggVorbis> ResourceImporterOggVorbis::load_from_buffer(const Vect
char *sync_buf = ogg_sync_buffer(&sync_state, OGG_SYNC_BUFFER_SIZE);
err = ogg_sync_check(&sync_state);
ERR_FAIL_COND_V_MSG(err != 0, Ref<AudioStreamOggVorbis>(), "Ogg sync error " + itos(err));
ERR_FAIL_COND_V(cursor > size_t(file_data.size()), Ref<AudioStreamOggVorbis>());
size_t copy_size = file_data.size() - cursor;
if (copy_size > OGG_SYNC_BUFFER_SIZE) {
copy_size = OGG_SYNC_BUFFER_SIZE;