Skip to content

Commit

Permalink
Merge pull request #97547 from lalitshankarchowdhury/audio-code-fix
Browse files Browse the repository at this point in the history
Vorbis: Remove redundant bounds check
  • Loading branch information
akien-mga committed Sep 28, 2024
2 parents 99aec99 + 2caaa2c commit 0e2a76d
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion modules/vorbis/resource_importer_ogg_vorbis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0e2a76d

Please sign in to comment.