Skip to content

Commit 0e2a76d

Browse files
committed
Merge pull request godotengine#97547 from lalitshankarchowdhury/audio-code-fix
Vorbis: Remove redundant bounds check
2 parents 99aec99 + 2caaa2c commit 0e2a76d

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

modules/vorbis/resource_importer_ogg_vorbis.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@ Ref<AudioStreamOggVorbis> ResourceImporterOggVorbis::load_from_buffer(const Vect
155155
char *sync_buf = ogg_sync_buffer(&sync_state, OGG_SYNC_BUFFER_SIZE);
156156
err = ogg_sync_check(&sync_state);
157157
ERR_FAIL_COND_V_MSG(err != 0, Ref<AudioStreamOggVorbis>(), "Ogg sync error " + itos(err));
158-
ERR_FAIL_COND_V(cursor > size_t(file_data.size()), Ref<AudioStreamOggVorbis>());
159158
size_t copy_size = file_data.size() - cursor;
160159
if (copy_size > OGG_SYNC_BUFFER_SIZE) {
161160
copy_size = OGG_SYNC_BUFFER_SIZE;

0 commit comments

Comments
 (0)