diff --git a/scene/resources/audio_stream_wav.cpp b/scene/resources/audio_stream_wav.cpp index 949ab8236d..d7b903e5e9 100644 --- a/scene/resources/audio_stream_wav.cpp +++ b/scene/resources/audio_stream_wav.cpp @@ -881,6 +881,7 @@ Ref AudioStreamWAV::load_from_buffer(const Vector &p_st // 'INFO' list type. // The size of an entry can be arbitrary. while (file->get_position() < end_of_chunk) { + ERR_BREAK_MSG(file->eof_reached(), "EOF reached while reading INFO chunk."); char info_id[4]; file->get_buffer((uint8_t *)&info_id, 4);